Support Questions

Find answers, ask questions, and share your expertise

I have 50 nifi flows for fetching data from rdbms to hbase, the flows have a lot of data queues up in connections between two processors. is there any method to clear up the queues of multiple flows in one go..may be using some rest api?

@matt burgess

1 ACCEPTED SOLUTION

@sri chaturvedi

Thanks for the clarification. I misunderstood your question.

You can use NIFI rest API to get the list of your connections with this endpoint /process-groups/{id}/connections

And loop over them and empty each connection with this endpoint /flowfile-queues/{id}/drop-requests

https://nifi.apache.org/docs/nifi-docs/rest-api/index.html

View solution in original post

5 REPLIES 5

Hi @sri chaturvedi

You can right click on connection and select empty queue

42404-screen-shot-2017-11-01-at-20814-pm.png

Hi, Thanks for the suggestion, but doing this thing for 5o flows is very time consuming, i was looking for an alternative if we can empty the queues of a particular Process group all at once, may be from nifi backend using some api?

@sri chaturvedi

Thanks for the clarification. I misunderstood your question.

You can use NIFI rest API to get the list of your connections with this endpoint /process-groups/{id}/connections

And loop over them and empty each connection with this endpoint /flowfile-queues/{id}/drop-requests

https://nifi.apache.org/docs/nifi-docs/rest-api/index.html

@sri chaturvedi

I just tried the following call on my NiFi:

You can put this logic inside a script and use Curl to call NiFi API.

I hope this helps

@Abdelkrim Hadjidj Thanks a lot for your inputs into this, i will try this, i think this will surely solve my issue.