Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.88 KB

README.md

File metadata and controls

50 lines (36 loc) · 1.88 KB

Apache NiFi - Processor for Apache Pulsar

How to build

To build the NAR files using Maven, just run the following commands. The first one makes sure that you are using Java version 21, which is necessary since NiFi 2.0 uses this version.

export JAVA_HOME=`/usr/libexec/java_home -v 21`
mvn clean package -Denforcer.skip

This will also generate a Docker image inside your local docker daemon with the tag streamnative/nifi

*Note: Currently, this command will load NAR files that were build using the default NiFi, Pulsar, and Java versions into the lib folder of the NiFi container for testing. Therefore, if you need to test artifacts built using a different version of these libraries, then you will first need to copy those NAR artifacts into the docker/lib folder BEFORE building the Docker image.

How to test

A Dockerfile has been included in the project that can be used to test the Processor locally, and can be started with the following command:

docker run --name nifi -d -p 8443:8443 
-e SINGLE_USER_CREDENTIALS_USERNAME=admin 
-e SINGLE_USER_CREDENTIALS_PASSWORD=ctsBtRBKHRAx69EqUghvvgEvjnaLjFEB 
streamnative/nifi

See the documentation on the base image for more configuration options

Visit https://localhost:8443/nifi/login and enter the username and password you provided in the docker command.

How to debug

The JVM Debugger can be enabled by setting the environment variable NIFI_JVM_DEBUGGER to any value when running the docker image, e.g.

docker run -d --name nifi \
-v /Users/david/Downloads/nifi-test/:/nifi-test
-p 8443:8443 -p 8000:8000 \
-e NIFI_JVM_DEBUGGER=true
-e SINGLE_USER_CREDENTIALS_USERNAME=admin
-e SINGLE_USER_CREDENTIALS_PASSWORD=ctsBtRBKHRAx69EqUghvvgEvjnaLjFEB
streamnative/nifi

References

https://stackoverflow.com/questions/55811413/is-it-possible-to-debug-apache-nifi-custom-processor