Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Custom ExtractTextProcessor not working

Custom ExtractTextProcessor not working

Rising Star

I want to actually build a custom processor in Nifi from a Github Repo(GIT Hub repo link) and i followed the below steps:-

  1. I cloned the repo to my Nifi server install maven
  2. Ran maven to build the Repo in my Nifi, then copied the NAR file to biin directory of Nifi reading the last points of Build processor link as i didn't wanted to build a default processor given in the link
  3. Restarted my Nifi but the processor is not showing up in the NIFI Gui
7 REPLIES 7
Highlighted

Re: Custom ExtractTextProcessor not working

Rising Star

@Shu

Any suggestions from you?

Highlighted

Re: Custom ExtractTextProcessor not working

@Vaibhav Kumar The NAR file should go to the lib directory and not the bin directory. Place your nar archive in the lib directory and restart your NiFi cluster. If your code is error free, you should be able to use your custom processor.

Hope that helps!

Highlighted

Re: Custom ExtractTextProcessor not working

Super Guru

@Vaibhav Kumar

In the article that you followed https://community.hortonworks.com/articles/4318/build-custom-nifi-processor.html to Build custom processor there is a bug i.e author mistakenly stated after creating .nar file then copy the .nar file to bin directory but we need to copy that .nar file to lib directory, that would be the root cause why you are not able to see the custom processor in nifi.

64674-copy-nar-to-bin.png

As i tried to recreate the whole scenario you did and i'm able to get the Custom ExtractTextProcessor after placing the .nar in lib directory.bin directory contains all executable(shell script,batch) files i.e to start/status/stop nifi service

dump-nifi.bat
nifi-env.bat
nifi-env.sh
nifi.sh
run-nifi.bat
status-nifi.bat

Please refer to below for more details

https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#how-to-install-and-start-nifi

Here is what i tried:-

As you did all the steps, just copy the .nar file to lib directory and restart the nifi then you are able to see the new custom extract text processor.

Steps:-

1.Cloned from git into directory

git clone https://github.com/tspannhw/nifi-extracttext-processor.git

2.go to the cloned directory

cd <cloned-directory>

3.run maven clean install

mvn clean install

once the install completes

cd <cloned-directory>\nifi-extracttext-processor\nifi-extracttext-nar\target 

4. Copy the nifi-extracttext-nar-1.5.nar file to NiFi /lib directory

5. Restart NiFi then you can find the new custom ExtractTextProcessor.

CustomExtractTextProcessor Configs:-

64672-custom-extracttext.png

64673-custom-extracttext-properties.png

Let us know if you are facing any issues ..!!

Highlighted

Re: Custom ExtractTextProcessor not working

Rising Star

It worked. Thanks

Highlighted

Re: Custom ExtractTextProcessor not working

Super Guru

If you look at the article I have written about my processor, you can see it says drop it in the lib and restart.

Here is the new article about the latest version of the processor:

https://community.hortonworks.com/content/kbentry/177370/extracting-html-from-pdf-excel-and-word-doc...

This has been tested on OSX and Centos7 NiFi 1.5 and HDF 3.1 NiFi

Highlighted

Re: Custom ExtractTextProcessor not working

Rising Star

It worked. Thanks

Don't have an account?
Coming from Hortonworks? Activate your account here