Skip to main content
krishna123
Silver ⭐️⭐️⭐️
Apr 5, 2022 2:56 PM UTC
Solved

Stop Nifi processor automatically

Hi,

 

Is there any way that Nifi processors stop automatically after no input for example 10 minutes rather than running until they are manually stopped?

Kindly let me know if there is any such feature..

steven-matison
Platinum ⭐️⭐️
Apr 6, 2022 12:54 PM UTC

@krishna123 NiFi data flows are expected to be operated in an always on capacity.  If no input is arriving, the processor is not doing anything, there is no reason to stop it.

 

Can you explain in more detail why you want it actually stopped?

 

6 replies

steven-matison
Platinum ⭐️⭐️
Platinum ⭐️⭐️
Apr 6, 2022 12:54 PM UTC

@krishna123 NiFi data flows are expected to be operated in an always on capacity.  If no input is arriving, the processor is not doing anything, there is no reason to stop it.

 

Can you explain in more detail why you want it actually stopped?

 

Translate
krishna123
Silver ⭐️⭐️⭐️
Apr 7, 2022 5:48 AM UTC

@steven-matison  Even if there is no input arriving the processor keeps in green running status know. Is it possible to stop it automatically after there is no input for example 10 minutes without any human intervention?

Translate
rafy
Gold ⭐️
May 7, 2022 9:12 AM UTC

The only thing i guessed you can do is to increase "Run schedule" time so the processor will not be looking for what to do all the time but will run  at the Run schedule time interval you specified.

 
Translate
steven-matison
Platinum ⭐️⭐️
Platinum ⭐️⭐️
Apr 7, 2022 12:15 PM UTC

@krishna123 this is how nifi is supposed to work.   If there is no input, even though the processor is Play/Green, it is not doing anything.     It is only "running" if there is input.

Translate
jameswookyz
Silver ⭐️
Feb 26, 2024 10:10 AM UTC

Can you explain in more detail?

Translate
MattWho
Titanium ⭐️⭐️
Titanium ⭐️⭐️
Feb 26, 2024 4:27 PM UTC

@krishna123 @jameswookyz @rafy 

NiFi processor are configured with a Run Schedule, by default processors are configured with a Run Schedule of 0 secs.  This tells NiFi core to schedule this processor to execute as often as possible.  The Scheduling part of the processor handles checking if any of the inbound connections to the processor with queued data or last execution resulted in data.
If there is no inbound queued FlowFiles, the NiFi controller will yield the processor scheduling.  This yielding is designed to prevent the processor from just constantly trying to schedule when there is no work to do. If there is work to do, the processor will get scheduled to execute.

The scheduling typically consumes microseconds of CPU time.  And the built-in yielding prevents excessive cpu usage when no work exists to execute upon.  Adjusting the run schedule does not change behavior of yielding, but when flow is constant for periods of time, changing the run schedule alters the throughput performance. 

Hope this clarifies things.

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

Translate