<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Find Processors with Stored State in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Find-Processors-with-Stored-State/m-p/374971#M242214</link>
    <description>&lt;P&gt;Good afternoon!&amp;nbsp; In planning out how we reset an environment when we have a refresh of one of our source systems, I need to ensure that any stateful processors (like&amp;nbsp;&lt;SPAN&gt;QueryDatabaseTableRecord) have their state cleared so that they pick up all new records.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a way to find all processors storing state?&amp;nbsp; Or, even better, to just destroy the state of all processors on the NiFi instance?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2026 06:50:09 GMT</pubDate>
    <dc:creator>kellerj</dc:creator>
    <dc:date>2026-04-21T06:50:09Z</dc:date>
    <item>
      <title>Find Processors with Stored State</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Find-Processors-with-Stored-State/m-p/374971#M242214</link>
      <description>&lt;P&gt;Good afternoon!&amp;nbsp; In planning out how we reset an environment when we have a refresh of one of our source systems, I need to ensure that any stateful processors (like&amp;nbsp;&lt;SPAN&gt;QueryDatabaseTableRecord) have their state cleared so that they pick up all new records.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a way to find all processors storing state?&amp;nbsp; Or, even better, to just destroy the state of all processors on the NiFi instance?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 06:50:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Find-Processors-with-Stored-State/m-p/374971#M242214</guid>
      <dc:creator>kellerj</dc:creator>
      <dc:date>2026-04-21T06:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Find Processors with Stored State</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Find-Processors-with-Stored-State/m-p/375057#M242267</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/97580"&gt;@kellerj&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Depending on your setup, state may be stored locally, in Zookeeper, or a mix of both.&lt;BR /&gt;&lt;BR /&gt;With a standalone non NiFi cluster setup, all state will be store in the local NiFi state directory.&lt;BR /&gt;With a NiFi cluster setup (even if cluster only consists of one node), some processors will store state in a mix of local via file (state specific to a single node) and cluster via zookeeper (state that needs to be shared amongst all nodes in a NiFi cluster).&lt;BR /&gt;&lt;BR /&gt;The NiFi configuration file "&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#state_management" target="_self"&gt;state-management.xml&lt;/A&gt;" defines where both the local state and cluster state is being stored.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can clear all local state by simply emptying the contents of the locally configured state directory on every node.&amp;nbsp; The "Directory" is defined in the "local-provider" within the state-management.xml file&lt;BR /&gt;&lt;BR /&gt;You can clear the Cluster state, by clearing out the znode on zookeeper defined in the "cluster-provider" within the state-management.xml file.&lt;BR /&gt;&lt;BR /&gt;NiFi must be shutdown before performing clearing out either local or cluster state.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 17:14:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Find-Processors-with-Stored-State/m-p/375057#M242267</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-08-08T17:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Find Processors with Stored State</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Find-Processors-with-Stored-State/m-p/375060#M242269</link>
      <description>&lt;P&gt;Thanks for the response.&amp;nbsp; TL;DR: It's complicated. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think my operations team will be a fan of shutting things down and purging files and/or zookeeper nodes.&amp;nbsp; But, this is good to know for when we have an important reason to purge state.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 16:47:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Find-Processors-with-Stored-State/m-p/375060#M242269</guid>
      <dc:creator>kellerj</dc:creator>
      <dc:date>2023-08-08T16:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Find Processors with Stored State</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Find-Processors-with-Stored-State/m-p/375062#M242271</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/97580"&gt;@kellerj&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The alternative is making rest-api calls or navigating to every processor that writes state and purge it manually.&amp;nbsp; You would need to keep track of all your current and newly added processors that store state in order to accomplish, but shutting down your NiFi is not needed to clear state this way.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As far as finding all processors that store state, that is challenge in itself.&amp;nbsp; The embedded documentation for every processor will have a "State Management:" section which will tell you if the component stores state (Note that processors that show only "Cluster" state will store that state locally if it is a non cluster configured standalone instance of NiFi").&lt;BR /&gt;&lt;BR /&gt;Once you have identified all the components your operations team is using by their unique UUID and filtered only those that write state, you can use that info to clear state using &lt;A href="https://nifi.apache.org/docs/nifi-docs/rest-api/index.html" target="_self"&gt;NiFi's rest-api&lt;/A&gt;, which is a multi-request process.&amp;nbsp; Then you need to worry about your operations team adding additional state based components later or removing and re-adding an existing state based processor triggering a new UUID. So while possible, it is challenging to orchestrate and maintain.&lt;BR /&gt;&lt;BR /&gt;You can also right click on a component to view its state and then purge that state directly from the listed state within NiFi UI.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 17:13:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Find-Processors-with-Stored-State/m-p/375062#M242271</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-08-08T17:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Find Processors with Stored State</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Find-Processors-with-Stored-State/m-p/375065#M242274</link>
      <description>&lt;P&gt;Yep!&amp;nbsp; Had moved on to that after your response and written up a JIRA for my team to build the needed tool.&amp;nbsp; Thanks again for the response.&amp;nbsp; My plan is the below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt; Find all the processors which may have state, then check if each has state, and if so, clear it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Find processors of used types which can contain state: e.g., QueryDatabaseTableRecord&lt;/LI&gt;&lt;LI&gt;For each, pull the state by the ID and check if it has any stored state&lt;OL&gt;&lt;LI&gt;if totalEntryCount of cluster or local state is non-zero&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;If so, call the clear state endpoint&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Query URL: /nifi-api/flow/search-results?q=QueryDatabaseTableRecord&lt;/P&gt;&lt;P&gt;Pull Processor State: /nifi-api/processors/41584e33-adc6-171d-0000-0000581caccb/state&lt;/P&gt;&lt;P&gt;Clear Processor State: POST /nifi-api/processors/41584e33-adc6-171d-0000-0000581caccb/state/clear-requests&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 19:01:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Find-Processors-with-Stored-State/m-p/375065#M242274</guid>
      <dc:creator>kellerj</dc:creator>
      <dc:date>2023-08-08T19:01:11Z</dc:date>
    </item>
  </channel>
</rss>

