Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

Get a list of redis cache keys

Rising Star

Hi there ,

We are looking for a way to list all keys of redis cache thru nifi. The best solution we found was a groovy script from this article Get list of keys in NiFi DistributedMapCache 

The script looks good and exactly what we are looking for. But when we try to implement it, we get the following error:


We are using the invokescriptprocessor and configure like this


What are we missing here 😉 Or another solutions is also more than welcome.

Thank you in advanced.

Kind regards,



Community Manager

@mburgess @SAMSAL Hi! Do you have any insights here? Thanks!


Diana Torres,
Community Moderator

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

Master Guru

The post you linked to has the command-line version of the Groovy script, it's based on my blog post at: You can put that code in your ExecuteScript (or InvokeScriptedProcessor in the onTrigger()). It might need slight alterations but should be pretty close. If you want to write them to a FlowFile you'll have to add that to the script as well.

Rising Star

Hi there @mburgess thank you for your reply. Let play around with your solution and see if i can get it working and write the output to a flowfile 🤓