How to clear the cache of FetchDistributedMapCache processor in Apache NiFi? I tried deleting the persisted directory and also tried giving a new directory all together but it still fetches old data. Thanks for your help.
Asked
Active
Viewed 4,401 times
6
-
1As of today (May 02, 2023), is there a built in way to clear the cache? – edjm May 02 '23 at 13:36
2 Answers
3
You should be able to stop the DistributedMapCacheClient and DistributedMapCacheServer, then delete the existing DistributedMapCacheServer and create a new one with same port as the previous one, then start them back up.

Bryan Bende
- 18,320
- 1
- 28
- 39
3
Inside NiFi, you could create a new DistributedMapCacheServer and point your processor at that instead. Outside of NiFi, I've written a Groovy script where you can interact with the DistributedMapCacheServer from the command line. The API only allows you to remove entries you know about; in the upcoming NiFi 1.2.0 release, you will be able to remove entries using a regular expression for the keys (implemented in NIFI-3627). At that point I will update the Groovy script to enable that feature.

mattyb
- 11,693
- 15
- 20
-
@mattyb is it possible to create a timer to create the cache entry if the cache entry is older than 1 hour? – ilovetolearn Jul 25 '18 at 15:49
-
Not currently, but feel free to write up an Improvement Jira to add an expiration timeout – mattyb Jul 30 '18 at 13:12