nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy LoPresto <alopre...@apache.org>
Subject Re: Where can I find documentation of implementing custom processor?
Date Wed, 20 Apr 2016 22:59:22 GMT
Hi Keith,

I’ve moved this conversation to the dev list as that is where coding is more frequently
discussed as opposed to the users list. If you’re not already subscribed, you can do so
following the instructions here [1] to ensure you see any replies.

The best approach is probably to examine the standard processors in [2]. Here you will be
able to see how other developers have extended the AbstractProcessor class with domain-specific
implementations. One example is EncryptContent [3] — you can see that while a lot of the
encryption logic is delegated to the various *Encryptor classes, the code includes processor-specific
tasks like configuring PropertyDescriptors (how users enter properties for the processor)
and validating those values, configuring relationships like success and failure, and using
the session and flowfile with StreamCallbacks and reporting provenance events.

For extensive documentation on writing a processor, the Developer Guide [4] is the most comprehensive
resource and describes the processor API, documenting your processor, common patterns, and
error handling & testing. If you have specific questions during the development process,
please feel free to ask on the dev list. The community has a broad and deep knowledge and
is excited to help new developers with general NiFi development or very domain-specific questions
as well.

[1] https://nifi.apache.org/mailing_lists.html <https://nifi.apache.org/mailing_lists.html>
[2] https://github.com/apache/nifi/tree/e4b7e47836edf47042973e604005058c28eed23b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard
<https://github.com/apache/nifi/tree/e4b7e47836edf47042973e604005058c28eed23b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard>
[3] https://github.com/apache/nifi/blob/e4b7e47836edf47042973e604005058c28eed23b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java
<https://github.com/apache/nifi/blob/e4b7e47836edf47042973e604005058c28eed23b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java>
[4] https://nifi.apache.org/docs/nifi-docs/html/developer-guide.html <https://nifi.apache.org/docs/nifi-docs/html/developer-guide.html>


Andy LoPresto
alopresto@apache.org
alopresto.apache@gmail.com
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Apr 20, 2016, at 3:42 PM, Keith Lim <Keith.Lim@ds-iq.com> wrote:
> 
> Is there any good example of implementing a custom Processor?
> 
> Thanks,
> Keith


Mime
View raw message