nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koji Kawamura <ijokaruma...@gmail.com>
Subject Re: use case similar to Wait/Notify
Date Tue, 11 Jul 2017 04:23:00 GMT
Hi Yuri,

That is achievable with Wait/Notify processors. The tricky part is how
to setup the initial state in a DistributedMapCache in order to pass
the first incoming FlowFile.
Currently, Wait/Notify processor doesn't provide a way to do that but
you can so by FetchDistributedMapCache.

I created an example flow. Template is available here, with its screenshot:
https://gist.github.com/ijokarumawak/9e1a4855934f2bb9661f88ca625bd244

On the right top of flow, I used GenerateFlowFile and
FetchDistributedMapCache to send a FlowFile to Notify, only if there
is no existing target cache key. It periodically check and create one
if necessary.

On the left side, I simulated incoming FlowFiles those will be queued
and processed one by one.

Hope this helps.

Thanks,
Koji

On Tue, Jul 11, 2017 at 12:35 AM, Yuri Krysko <Yuri.Krysko@mcdean.com> wrote:
> Good morning Everyone,
>
> I am trying to see if I could make my scenario work with Wait/Notify processors. Basically,
I require the following implementation:
>
>   1.  Pass a single flow file into a processor group
>   2.  Keep subsequent all flow flies in a wait queue until the first flow file is processed
and sent out of the processor group to Notify processor, which updates the cache.
>
> Would I be able to accomplish this scenario without writing a custom processor?
>
> Thanks much,
> Yuri
>
> ________________________________
>
> LEGAL DISCLAIMER: M.C. Dean, Inc. and its subsidiaries considers this e-mail and any
files transmitted with it to be protected, proprietary or privileged information intended
solely for the use of the named recipient(s). Any disclosure of this material or the information
contained herein, in whole or in part, to anyone outside of the intended recipient or affiliates
is strictly prohibited. M. C. Dean, Inc. accepts no liability for the content of this e-mail
or for the consequences of any actions taken on the basis of the information contained in
it, unless that information is subsequently confirmed in writing. Employees of M.C. Dean,
Inc. are instructed not to infringe on any rights of the recipient; any such communication
violates company policy. If you are not the intended recipient, any disclosure, copying, distribution,
or action taken or omitted in reliance on this information is strictly prohibited by M.C.
Dean, Inc.; please notify the sender immediately by return e-mail, delete this communication
and destroy all copies.

Mime
View raw message