<?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 Re: Get list of keys in NiFi DistributedMapCache in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/384947#M245574</link>
    <description>&lt;P&gt;Hi Diana, good idea. I'll create a new thread. Thank you.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2024 12:57:31 GMT</pubDate>
    <dc:creator>Dave0x1</dc:creator>
    <dc:date>2024-03-13T12:57:31Z</dc:date>
    <item>
      <title>Get list of keys in NiFi DistributedMapCache</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/213771#M175695</link>
      <description>Here is my use case -- I would like to use the DistributedMapCache to cache about 30k records that I read from an http service. Once per day, I'd like to update the cache, which includes removing items which are no longer returned by the http service. I had wanted to implement this by writing a custom processor to retrieve the list of keys from the DistributedMapCache, and remove any item which did not get returned by the http service. However, when I looked at the interface for DistributedMapCacheClient, the method to return the set of keys (keySet) throws the UnsupportedOperationException. Does anyone have any suggestions on how else I can implement this? I'm a newbie with NiFi -- any suggestions you have would be greatly appreciated! Thanks!</description>
      <pubDate>Wed, 15 Aug 2018 06:13:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/213771#M175695</guid>
      <dc:creator>julie_nyikos</dc:creator>
      <dc:date>2018-08-15T06:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of keys in NiFi DistributedMapCache</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/213772#M175696</link>
      <description>&lt;P&gt;The default implementation is to throw UnsupportedOperationException, but many/most/all of the subclasses override it. Check the &lt;A href="https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java#L375" target="_blank"&gt;reference impl&lt;/A&gt;, and since you are removing things, also check &lt;A href="https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java#L260" target="_blank"&gt;removeAndGet()&lt;/A&gt;, &lt;A href="https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java#L281" target="_blank"&gt;removeByPattern()&lt;/A&gt;, and &lt;A href="https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java#L295" target="_blank"&gt;removeByPatternAndGet()&lt;/A&gt; to see if they would help, they might save you the trouble of fetching all keys to remove some of them.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 06:37:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/213772#M175696</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2018-08-15T06:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of keys in NiFi DistributedMapCache</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/213773#M175697</link>
      <description>&lt;P&gt;Ah yes thank you! Indeed the reference impl does implement the keySet method. I found your dcache groovy script and attempted to modify it to call the keySet method to return the set of keys, but I don't know groovy and so far it's not working... any chance I can get you to add a "getkeys" option to your groovy script if it's not too difficult? Thank you so much for your help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 06:52:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/213773#M175697</guid>
      <dc:creator>julie_nyikos</dc:creator>
      <dc:date>2018-08-15T06:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of keys in NiFi DistributedMapCache</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/213774#M175698</link>
      <description>&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/86519-dcachegroovy.txt"&gt;dcachegroovy.txt&lt;/A&gt; Here you go! The command is called "keys", prints each key on its own line.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 03:10:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/213774#M175698</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2018-08-16T03:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of keys in NiFi DistributedMapCache</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/213775#M175699</link>
      <description>&lt;P&gt;You are awesome! Thank you!!!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 22:11:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/213775#M175699</guid>
      <dc:creator>julie_nyikos</dc:creator>
      <dc:date>2018-08-16T22:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of keys in NiFi DistributedMapCache</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/384941#M245569</link>
      <description>&lt;P&gt;Hi there, the script looks good and exactly what we are looking for. Just a quick question, when we try to implement it, we get the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dave0x1_0-1710327889113.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/40051iA770E6C138025B3E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dave0x1_0-1710327889113.png" alt="Dave0x1_0-1710327889113.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We are using the invokescriptprocessor and configure like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dave0x1_1-1710327976758.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/40052i6134727238EBDDF4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dave0x1_1-1710327976758.png" alt="Dave0x1_1-1710327976758.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What are we missing here &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 11:06:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/384941#M245569</guid>
      <dc:creator>Dave0x1</dc:creator>
      <dc:date>2024-03-13T11:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of keys in NiFi DistributedMapCache</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/384944#M245571</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/96482"&gt;@Dave0x1&lt;/a&gt;&amp;nbsp;As this is an older post, you would have a better chance of receiving a resolution by&lt;A href="“https://community.cloudera.com/t5/forums/postpage/board-id/Questions”" target="_blank"&gt; starting a new thread&lt;/A&gt;. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 12:23:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/384944#M245571</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-03-13T12:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of keys in NiFi DistributedMapCache</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/384947#M245574</link>
      <description>&lt;P&gt;Hi Diana, good idea. I'll create a new thread. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 12:57:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Get-list-of-keys-in-NiFi-DistributedMapCache/m-p/384947#M245574</guid>
      <dc:creator>Dave0x1</dc:creator>
      <dc:date>2024-03-13T12:57:31Z</dc:date>
    </item>
  </channel>
</rss>

