The user guide https://nifi.apache.org/docs/nifi-docs/html/user-guide.html has the following detailed information about the priority sorter, please help I understand these differences and provide any real-time examples.
FirstInFirstOutPrioritizer: Given two FlowFiles, first process the FlowFiles that reach the connection first.
OldestFlowFileFirstPrioritizer: Given two FlowFiles, the oldest FlowFiles in the data stream will be processed first.’If the priority order is not selected, use this default scheme.
< div class="answer"> Imagine two processors A and B are connected to the funnel, and then the funnel is connected to the processor C.
Scenario 1-between the funnel and the processor C Connections have a first-in, first-out priority.
In this case, the flow files in the queue between the funnel and connection C will be processed strictly according to the order in which they arrive in the queue.
Scenario 2-The connection between the funnel and processor C has the earliest stream file priority priority.
In this case, there may already be a stream file in the queue between the funnel and connection C, But one of the processors will transfer the stream to a queue older than all the stream files in that queue, and it will jump to the front.
You can imagine that some stream files come from different parts of the stream, and their processing time It is longer than other streaming files, but they all end up in the same queue, so these streaming files from the longer processing part are considered older.
Users The guide https://nifi.apache.org/docs/nifi-docs/html/user-guide.html has the following details about the prioritizer, please help me understand these differences and provide any real-time examples.
FirstInFirstOutPrioritizer: Given two FlowFiles, the FlowFiles that arrive at the connection first will be processed first.
OldestFlowFileFirstPrioritizer: Given two FlowFiles, the oldest of the data streams will be processed first FlowFiles.’If the priority is not selected, use this default scheme.
Imagine two processors A and B are connected to the funnel, and then the funnel is connected to the processor C.
Scenario 1-between the funnel and the processor C The connection has a first-in first-out priority.
In this case, the flow files in the queue between the funnel and connection C will be processed strictly according to the order in which they arrive in the queue.
Scenario 2-The connection between the funnel and processor C has the earliest stream file priority priority.
In this case, there may already be a stream file in the queue between the funnel and connection C, But one of the processors will transfer the stream to a queue older than all the stream files in that queue, and it will jump to the front.
You can imagine some stream files come from different parts of the stream, and their processing time It is longer than other streaming files, but they all end up in the same queue, so these streaming files from the longer processing part are considered older.