<?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 Age Off Duration in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Age-Off-Duration/m-p/403025#M251861</link>
    <description>&lt;DIV class="flex max-w-full flex-col flex-grow"&gt;&lt;DIV class="min-h-8 text-message relative flex w-full flex-col items-end gap-2 whitespace-normal break-words text-start [.text-message+&amp;amp;]:mt-5"&gt;&lt;DIV class="flex w-full flex-col gap-1 empty:hidden first:pt-[3px]"&gt;&lt;DIV class="markdown prose w-full break-words dark:prose-invert dark"&gt;&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;There are NiFi processors that store state in memory, one example being the &lt;STRONG&gt;DetectDuplicate&lt;/STRONG&gt; processor, which "remembers" FlowFiles based on a specific attribute. The duration for which this memory is retained is determined by the &lt;STRONG&gt;Age Off Duration&lt;/STRONG&gt; parameter. I would like to know the default value for this parameter and whether it is possible to configure it to retain the memory indefinitely (i.e., with no expiration). Currently, I am using a value of '365000 days'.&lt;/P&gt;&lt;P&gt;Additionally, I would like to know if there is a way to preserve the detected values even after a NiFi restart.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 26 Feb 2025 15:53:23 GMT</pubDate>
    <dc:creator>jirungaray</dc:creator>
    <dc:date>2025-02-26T15:53:23Z</dc:date>
    <item>
      <title>Age Off Duration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Age-Off-Duration/m-p/403025#M251861</link>
      <description>&lt;DIV class="flex max-w-full flex-col flex-grow"&gt;&lt;DIV class="min-h-8 text-message relative flex w-full flex-col items-end gap-2 whitespace-normal break-words text-start [.text-message+&amp;amp;]:mt-5"&gt;&lt;DIV class="flex w-full flex-col gap-1 empty:hidden first:pt-[3px]"&gt;&lt;DIV class="markdown prose w-full break-words dark:prose-invert dark"&gt;&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;There are NiFi processors that store state in memory, one example being the &lt;STRONG&gt;DetectDuplicate&lt;/STRONG&gt; processor, which "remembers" FlowFiles based on a specific attribute. The duration for which this memory is retained is determined by the &lt;STRONG&gt;Age Off Duration&lt;/STRONG&gt; parameter. I would like to know the default value for this parameter and whether it is possible to configure it to retain the memory indefinitely (i.e., with no expiration). Currently, I am using a value of '365000 days'.&lt;/P&gt;&lt;P&gt;Additionally, I would like to know if there is a way to preserve the detected values even after a NiFi restart.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Feb 2025 15:53:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Age-Off-Duration/m-p/403025#M251861</guid>
      <dc:creator>jirungaray</dc:creator>
      <dc:date>2025-02-26T15:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Age Off Duration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Age-Off-Duration/m-p/403038#M251865</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/121770"&gt;@jirungaray&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Welcome to the community.&lt;BR /&gt;&lt;BR /&gt;The &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.28.0/org.apache.nifi.processors.standard.DetectDuplicate/index.html" target="_blank" rel="noopener"&gt;DetectDuplicate&lt;/A&gt; processor does not store anything in NiFi state providers (local state directory or cluster state in zookeeper).&amp;nbsp; The DetectDuplicate processor utilizes a DistributedMapCache Service to store cached items.&amp;nbsp; Depending on the cache service used, those cache service may offer retention configurations for number of cache entries and cache entry persistence.&lt;BR /&gt;&lt;BR /&gt;Any NiFi component that retains state will indicate such in its documentation under the "State Management" section.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattWho_0-1740603046354.png" style="width: 467px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/44105iBF49724F78AFD218/image-dimensions/467x124?v=v2" width="467" height="124" role="button" title="MattWho_0-1740603046354.png" alt="MattWho_0-1740603046354.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The "&lt;SPAN&gt;Age Off Duration" configuration will age off cache entries that may still exist when that duration is reached, but it can not control the number of cache entries the end service will retain.&amp;nbsp; So the cache service may still be evicting cache entries prior to that configured Age of Duration is reached.&lt;BR /&gt;&lt;BR /&gt;Since you mention that your Cache Entries are not being preserved on NiFi restart, I assume you have configured your DetectDuplicate to use the &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-distributed-cache-services-nar/1.28.0/org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService/index.html" target="_blank" rel="noopener"&gt;DistributedMapCacheClientService&lt;/A&gt;.&amp;nbsp; &amp;nbsp; The DistributedMapCacheClientService is dependent on the existence of a running &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-distributed-cache-services-nar/1.28.0/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/index.html" target="_blank" rel="noopener"&gt;DistributedMapCacheServer&lt;/A&gt;.&amp;nbsp; This DistributedMapCacheServer does in fact hold cache entries within NiFi's Heap memory and unless you have configured a "Persistence Directory", will lose all cache entries on NiFi service stop.&amp;nbsp; The&amp;nbsp;DistributedMapCacheServer also has configuration thresholds for the max number of cache entries it will hod before evicting cache entires based on the eviction strategy configured.&amp;nbsp; This configuration established an upper boundary.&amp;nbsp; Keep in mind the higher the Max Cache Entries setting, the more NiFi heap memory is used which could lead to NiFi experiencing OutOfMemory (OOM) exceptions.&amp;nbsp; Since it sounds like you want to retain a very large amount of cached entries, I'd recommend against using the NiFi internal DistributedMapCacheClientService considering the high heap memory usage it would require and the high likelihood that will impact your NiFi's stability and performance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NOTE:   The DistributedMapCacheClientService and DistributedMapCacheServer do NOT offer any form of High Availability.   The DistributeMapCacheClientService can only be configured with a single server hostname.  While the DistributedMapCacheServer when started does create a running Cache server on all hosts within the NiFi cluster, the cached entries are not shared or replicated across all of them.  ONLY the cache server hostname configured in the DistributedMapCacheClientService is used.   For HA, you should be using a more robust external to NiFi cache service like Redis.  &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help our community grow and thrive. If you found&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt;&amp;nbsp;of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 20:51:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Age-Off-Duration/m-p/403038#M251865</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2025-02-26T20:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Age Off Duration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Age-Off-Duration/m-p/403300#M252007</link>
      <description>&lt;P&gt;What do you mean by "&lt;SPAN&gt;Persistence Directory&lt;/SPAN&gt;"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Mar 2025 16:14:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Age-Off-Duration/m-p/403300#M252007</guid>
      <dc:creator>jirungaray</dc:creator>
      <dc:date>2025-03-01T16:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Age Off Duration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Age-Off-Duration/m-p/403436#M252070</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/121770"&gt;@jirungaray&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The&amp;nbsp;&lt;A class="component-link" href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-distributed-cache-services-nar/1.28.0/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/index.html" target="component-usage"&gt;DistributedMapCacheServer&lt;/A&gt;&amp;nbsp;controller service sets up a cache server which will keep all cached objects in NiFi's JVM heap memory.&amp;nbsp; This cache is lost if the controller service is disabled/re-enabled or if NiFi were to restart unless the "&lt;SPAN&gt;Persistence Directory" is configured.&amp;nbsp; The persistence directory is some local disk directory where cache entries are persisted in addition to those cache entries also being in Heap memory.&amp;nbsp; The persistence to disk allows the in memory cache to be reloaded if the cache server is disabled/re-enabled or NiFi is restarted.&amp;nbsp; I assume this is the cache server you are currently using.&lt;BR /&gt;&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 17:26:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Age-Off-Duration/m-p/403436#M252070</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2025-03-03T17:26:03Z</dc:date>
    </item>
  </channel>
</rss>

