Support Questions

Find answers, ask questions, and share your expertise

Nifi clear state

avatar
Contributor

Is there a way to clear a state of nifi? For example if i used ListS3 or Email processor. And i did some stuff, and they now now which files do they checked. Can i make them "forget"?

Also is there a way to clean up/hard restart of nifi? To forget everything except flow file about processors and controllers.

Best

Bojan

5 REPLIES 5

avatar

Bojan, stop the processor in question, right-click -> view state -> Clear. This will depend on whether the processor uses NiFi's state api.

To clear all state and data one can stop NiFi and proceed with deleting contents of flowfile, content and provenance repository directories, then start up.

avatar
Contributor

Hi Andrew, i tried to delete content of those directories. But still did not work. Even state of ListS3 was empty msg in debug was there is no new files yielding.

I will try to delete all those directories completely, and see what will happen.

avatar
Contributor

I tried new installation of nifi, and just copied flowfile gz in conf. Still does not work, is the state also in components? Or just in the state state folder?

avatar
Rising Star

Hi Andrew, Is there any way to automate clearing state from ListS3 processor when the flow is scheduled? I cannot clear the state every time I run the flow.

avatar
Rising Star

This doesn't works for me, i places a flow.xml.gz from dev to prd cluster,cleared all repsotiories of prod but still i see state in processors.Could you please suggest other way to clear state for all processors at one go ? i tried deleting state folder contents under /nifi/conf but that too dint help,it gave me some error.