How to turn off Nifi Processor Schedule

旧街凉风 提交于 2019-12-10 19:25:45

问题


I have GetHttp and InvokeHttp Nifi processors which initiates flows in Nifi, but I want them to get from the URLs only once and pass the data to the next process With processor configurations I am unable to turn off scheduling, how to achieve this.


回答1:


InvokeHttp could be not initial and could be triggered by incoming flow file from other processor.

So, you can put kind of sync logic before and after your InvokeHTTP processor.

For example you can use Wait/Notify processors.




回答2:


Apache NiFi processors and flows are designed for constant data streams rather than single "job executions" or "batch processing". A metaphor we use often is that rather than building and fitting pipes to run water through, NiFi helps you dig irrigation ditches along an already-flowing river. The data is already there (and moving) all the time.

If this is truly a one-time action you need to trigger, you can set the Run Schedule to something like 30 sec and manually Start and then Stop those processors. They will execute once, and as long as you stop them within 30 seconds, not execute again.

If this isn't something you can do manually, you can set the Run Schedule to something like 52 weeks. You can also change the Scheduling Strategy to CRON driven and set the Run Schedule to a crontab parameter with a very long schedule.

As @daggett noted, you can also use the Wait/Notify processors to trigger a flow which otherwise would not execute, but this only works for InvokeHTTP, as GetHTTP is a source processor.



来源:https://stackoverflow.com/questions/44153120/how-to-turn-off-nifi-processor-schedule

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!