Why didn't my NiFi Nar appear on the processor list?

Just did my first NAR from the tutorial, put it in the / lib file, and relaunched NiFi. The processor appears as loaded in the logs but does not appear in the processor list. Any ideas?

Tutorial: http://www.nifi.rocks/developing-a-custom-apache-nifi-processor-json/

        @SideEffectFree
        @Tags({"JSON", "NIFI ROCKS"})
        @CapabilityDescription("Fetch value from json path.")
        public class JsonProcessor extends AbstractProcessor {
           ...
        }

      

Edit: I see two lines in the logs with this in it:

2017-07-06 19:34:06,200 INFO [main] org.apache.nifi.nar.NarClassLoaders Loaded NAR file: C:\UserApps\NIFI-1~1.0\.\work\nar\extensions\examples-1.0-SNAPSHOT.nar-unpacked as class loader org.apache.nifi.nar.NarClassLoader[.\work\nar\extensions\examples-1.0-SNAPSHOT.nar-unpacked]

      

What should the processor call in the list? JsonProcessor?

Edit:

Tried changing <nifi.version>1.3.0</nifi.version>

in pom from 1.2.0 to 1.3.0. There is no joy.

+3


source to share


2 answers


Thus, apart from coding the program, you must put a file called

org.apache.nifi.processor.Processor

      

in YOUR project so that it appears. I would assume NiFi is scanning annotated classes, but alas, it doesn't. Something might be safe.



NiFi processor program structure

This tutorial has it. "Viewing" got me again!

+3


source


I also used this tutorial to create a client processor. The problem was that I messed up the directory ./lib

.

When starting Apache Nifi, you will notice the following at the beginning of the log:

Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
NiFi home: /usr/local/Cellar/nifi/1.6.0/libexec

      



Confirm the NAR file is the folder $NIFI_HOME/libexec/lib

that will be /usr/local/Cellar/nifi/1.6.0/libexec/lib

in my case.

I hope this helps

NB: I was running Apache Nifi on Mac, logs may differ on other OS

0


source







All Articles