[ 
https://issues.apache.org/jira/browse/NIFI-238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14271680#comment-14271680
 ] 

Mark Payne commented on NIFI-238:
---------------------------------

Ryan,

That's great! We've not gotten the Developer Guide out there yet, so I know a 
lot of this stuff isn't obvious. So I appreciate you digging in anyway.

I took a look at the bundle and do have a bit of feedback, mostly stuff that we 
need to put into a Developer Guide:

The Processor is extending AbstractHadoopProcessor. This is likely to result in 
some ClassNotFoundException's, though, because that Processor is in a different 
NAR, and NARs map directly to ClassLoaders. So there are 2 ways to handle this: 
the obvious way is to not depend on AbstractHadoopProcessor and implement the 
functionality yourself. Probably not so fun. The other way is to make the 
parent of your NAR ClassLoader the AbstractHadoopProcessor's ClassLoader. You 
can do this by updating your nar's pom with:

<dependency>
  <groupId>org.apache.nifi</groupId>
  <artifactId>hadoop-nar</artifactId>
  <version>${nifi-version}</version>
  <type>nar</type>
</dependency>

You'll probably also want to add a @Tags annotation and a 
@CapabilityDescription annotation to the Processor. They aren't required but 
make the Processor much more usable by providing Tags/Keywords for the 
processor and a blurb about what it does (respectively) in the UI.

The Mock Framework is really useful for testing Processors outside of NiFi. In 
NiFi you'll have to rebuild the artifact, add it to the lib/ directory, and 
restart. But the Mock Framework makes it really easy to feed in test data, etc. 
It's used extensively in the unit tests for the standard processors. Largely 
for integration testing. If you've not had a chance to look at that yet, it 
makes developing Processors MUCH easier.

I hope this information is useful to you. If there's anything that doesn't make 
sense in the API or something doesn't work like you expect (or you just have 
general comments) feel free to shoot an e-mail to 
[email protected]. It's monitored pretty closely, so you should 
get a response quickly.

Thanks again!
-Mark


> Add processors to write datasets using Kite
> -------------------------------------------
>
>                 Key: NIFI-238
>                 URL: https://issues.apache.org/jira/browse/NIFI-238
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Ryan Blue
>
> I think it would be great to have a set of processors that parse incoming 
> flow files and add the data to Kite datasets.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to