Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understand the Notify and Wait process in NIFI in my flow

Tags:

apache-nifi

I am new to the NIFI process where in my current job, I have notify and wait process. could someone help me to understand this flow

Notify&Wait

On what basis the Notify work. in my case we have 4 schema files process and 4 data files with respective those. the below details are notify properties.. enter image description here

Below are the Wait properties: enter image description here

***I understand that, the wait process looking for 8 Signal to proceed to process the next level of process. but technically how this will woks not sure.

Please it will be much appreciate if some one provide in-detail technical level explanation on this processes.

like image 822
ahmed Avatar asked Mar 14 '18 11:03

ahmed


1 Answers

The blog mentioned by @Andy gives a nice explanation on how to use the wait and notify together: https://ijokarumawak.github.io/nifi/2017/02/02/nifi-notify-batch/

However, if you want a more in depth technical understanding, I find the documentation of the individual processors very useful.

Description of wait

Routes incoming FlowFiles to the 'wait' relationship until a matching release signal is stored in the distributed cache from a corresponding Notify processor. When a matching release signal is identified, a waiting FlowFile is routed to the 'success' relationship, with attributes copied from the FlowFile that produced the release signal from the Notify processor. The release signal entry is then removed from the cache. Waiting FlowFiles will be routed to 'expired' if they exceed the Expiration Duration. If you need to wait for more than one signal, specify the desired number of signals via the 'Target Signal Count' property. This is particularly useful with processors that split a source FlowFile into multiple fragments, such as SplitText. In order to wait for all fragments to be processed, connect the 'original' relationship to a Wait processor, and the 'splits' relationship to a corresponding Notify processor. Configure the Notify and Wait processors to use the '${fragment.identifier}' as the value of 'Release Signal Identifier', and specify '${fragment.count}' as the value of 'Target Signal Count' in the Wait processor.It is recommended to use a prioritizer (for instance First In First Out) when using the 'wait' relationship as a loop.

Description of Notify

Caches a release signal identifier in the distributed cache, optionally along with the FlowFile's attributes. Any flow files held at a corresponding Wait processor will be released once this signal in the cache is discovered.

like image 88
Dennis Jaheruddin Avatar answered Nov 17 '22 23:11

Dennis Jaheruddin