Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear the cache of FetchDistributedMapCache processor

Tags:

apache-nifi

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.

like image 755
Geeta Singh Avatar asked Apr 24 '17 08:04

Geeta Singh


2 Answers

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.

like image 81
Bryan Bende Avatar answered Oct 30 '22 11:10

Bryan Bende


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.

like image 22
mattyb Avatar answered Oct 30 '22 13:10

mattyb