Support Questions

Find answers, ask questions, and share your expertise

How to stop the iterations of a NIFI processors

avatar
Contributor

Hi, I'm trying to call a url using invokehttp processor using POST method , which will basically inserts some data into the database. The processor is working fine and but it is repeatedly calling the url which is making the data insertion fail due to duplicates issue and also increasing the network traffic. Is there any way i can configure in the processor that once the response from the url comes then stop calling the url again?.

1 ACCEPTED SOLUTION

avatar

Hi,

You can schedule your job to be run once a day, once a week, etc. So if you want it to run only once I'd change the scheduling strategy. Otherwise, once your request has been sent you may want to just stop the processor. Another option is to use a second InvokeHttp to call the NiFi REST API to stop the first InvokeHttp.

But IMO, if you are using NiFi for a one time request, once it is done, stop the processor.

View solution in original post

3 REPLIES 3

avatar

Hi,

You can schedule your job to be run once a day, once a week, etc. So if you want it to run only once I'd change the scheduling strategy. Otherwise, once your request has been sent you may want to just stop the processor. Another option is to use a second InvokeHttp to call the NiFi REST API to stop the first InvokeHttp.

But IMO, if you are using NiFi for a one time request, once it is done, stop the processor.

avatar
Contributor

Thanks for the suggestions @Pierre Villard. I don't want to stop the processor , i want the processor to run but dont call the same url again and again. There will be list of urls will be passed to invokehttp processor and i want this processor to call url only once. Is there any way i can tell the processor that the response for this url has come so dont call it again , wait for next url and call it, if there is no urls then stop the processor.

avatar
Guru

This article shows how to use a list of urls in an external file to iterate InvokeHttp

https://community.hortonworks.com/content/kbentry/48816/nifi-to-ingest-and-transform-rss-feeds-to-hd...

You can schedule GetFile to run once per day, week, etc.

If errors at the end of the flow inserting into a db, you can configure to ignore failure.