You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Huagen peng <hu...@gmail.com> on 2016/06/06 01:23:16 UTC

Controls order of execution in a queue?

Hi,

I notice that the order of execution in an incoming queue is not FIFO (first in first out).  For example, I have a ExecuteStreamCommand processor, which at one point may have more than 20 flowflies waiting.  It appears that the processor just randomly select a flowfile from the queue after it finishes one.  This leaves some flowfile waiting in the queue for a wrong time. I would like the processor to run the flowfiles FIFO.  Is there anyway to specify the order of execution?

Thanks,

Huagen

Re: Controls order of execution in a queue?

Posted by Huagen peng <hu...@gmail.com>.
Thanks, Mark and Matthew.

Huagen
> 在 2016年6月5日,下午9:34,Matthew Clarke <ma...@gmail.com> 写道:
> 
> The default priority is not FIFO, but rather oldest FlowFile first. You can change the priority order on a connection through that connections configuration. Theresa are a list of prioritizers to choose from. Simply drag and drop from the list to apply the priority strategy you want for that connection. You will find FIFO is one of the available options.
> 
> On Jun 5, 2016 9:23 PM, "Huagen peng" <huagen.peng@gmail.com <ma...@gmail.com>> wrote:
> Hi,
> 
> I notice that the order of execution in an incoming queue is not FIFO (first in first out).  For example, I have a ExecuteStreamCommand processor, which at one point may have more than 20 flowflies waiting.  It appears that the processor just randomly select a flowfile from the queue after it finishes one.  This leaves some flowfile waiting in the queue for a wrong time. I would like the processor to run the flowfiles FIFO.  Is there anyway to specify the order of execution?
> 
> Thanks,
> 
> Huagen


Re: Controls order of execution in a queue?

Posted by Matthew Clarke <ma...@gmail.com>.
The default priority is not FIFO, but rather oldest FlowFile first. You can
change the priority order on a connection through that connections
configuration. Theresa are a list of prioritizers to choose from. Simply
drag and drop from the list to apply the priority strategy you want for
that connection. You will find FIFO is one of the available options.
On Jun 5, 2016 9:23 PM, "Huagen peng" <hu...@gmail.com> wrote:

> Hi,
>
> I notice that the order of execution in an incoming queue is not FIFO
> (first in first out).  For example, I have a ExecuteStreamCommand
> processor, which at one point may have more than 20 flowflies waiting.  It
> appears that the processor just randomly select a flowfile from the queue
> after it finishes one.  This leaves some flowfile waiting in the queue for
> a wrong time. I would like the processor to run the flowfiles FIFO.  Is
> there anyway to specify the order of execution?
>
> Thanks,
>
> Huagen

Re: Controls order of execution in a queue?

Posted by Mark Payne <ma...@hotmail.com>.
Huagen,

NiFi provides the concept of Prioritizers to determine how data is Prioritized / sorted.
You can right-click on a connection and click Configure. From the Settings tab, you can
drag and drop to select which prioritizers are used and in what order. For instance, you
can drag the First In First Out Prioritizer from the list of Available Prioritizers into the list
of Selected Prioritizers. For more information, see [1].

Thanks
-Mark

[1] http://nifi.apache.org/docs/nifi-docs/html/user-guide.html#settings

> On Jun 5, 2016, at 9:23 PM, Huagen peng <hu...@gmail.com> wrote:
> 
> Hi,
> 
> I notice that the order of execution in an incoming queue is not FIFO (first in first out).  For example, I have a ExecuteStreamCommand processor, which at one point may have more than 20 flowflies waiting.  It appears that the processor just randomly select a flowfile from the queue after it finishes one.  This leaves some flowfile waiting in the queue for a wrong time. I would like the processor to run the flowfiles FIFO.  Is there anyway to specify the order of execution?
> 
> Thanks,
> 
> Huagen