I definitely keep running into use cases where it would be nice if there was a 
proper way in NiFi to say “Hey Process Group, your only allowed to process one 
input file at a time and can’t do anything else until it’s done”

Can you share an example of your workflow. I’ll take a look and see if it’s one 
of the more common gotchas for wait/notify.

Thanks

From: David Gallagher <dgallag...@cleverdevices.com>
Reply-To: "users@nifi.apache.org" <users@nifi.apache.org>
Date: Wednesday, June 12, 2019 at 11:16 AM
To: "users@nifi.apache.org" <users@nifi.apache.org>
Subject: RE: Wait processor decrements count below zero

Hi Shawn – thanks for the insight! There are Notify processors in several 
places within the flow that set the Signal Counter Delta to 1, but any one 
flowfile would never trip more than one of them. There’s also a generator 
Notify that initializes the gate to 1. Immediately after the Wait processor, 
there’s a Notify that sets the Signal Counter Delta to 0 to prevent the next 
flowfile from proceeding before the gate is cleared. If there is work waiting 
in the Wait queue, that could be tripping the back-to-back issue…

Thanks,

Dave

From: Shawn Weeks <swe...@weeksconsulting.us>
Sent: Wednesday, June 12, 2019 11:50 AM
To: users@nifi.apache.org
Subject: Re: Wait processor decrements count below zero

How are you setting the value to “1” in the Notify Processor? Do you have two 
Notify’s back to back with one setting to 0 and then the next incrementing by 
one. I’ve always had trouble if several Notify’s are trying to change the same 
key because the Wait sees the value as it flip/flops.

Thanks
Shawn

From: David Gallagher 
<dgallag...@cleverdevices.com<mailto:dgallag...@cleverdevices.com>>
Reply-To: "users@nifi.apache.org<mailto:users@nifi.apache.org>" 
<users@nifi.apache.org<mailto:users@nifi.apache.org>>
Date: Wednesday, June 12, 2019 at 10:44 AM
To: "users@nifi.apache.org<mailto:users@nifi.apache.org>" 
<users@nifi.apache.org<mailto:users@nifi.apache.org>>
Subject: Wait processor decrements count below zero

Hi – I have a gate set up with a Wait processor listening for a target signal 
count of ‘1’. I have several Notify processors that set the value to ‘1’ when 
the system is able to take work. If there is work waiting in the queue while 
the ‘gate’ is closed, I sometimes get this error:

Wait[id=016b1003-bf40-1031-d67b-3fa2c1f1acc9] 
Wait[id=016b1003-bf40-1031-d67b-3fa2c1f1acc9] failed to process session due to 
fromIndex(0) > toIndex(-1); Processor Administratively Yielded for 1 sec: 
java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-1)

Is this because of something that I’m configuring incorrectly on the Wait 
processor? When the gate is set to 1 by a Notify processor, it seems as though 
the work will not get released from the Wait queue until the number for the 
signal is greater than or equal to the ‘toIndex’ indicated in the message.

Thanks,

Dave

Reply via email to