You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Minmin DU (JIRA)" <ji...@apache.org> on 2017/09/18 05:32:00 UTC

[jira] [Commented] (NIFI-3627) Add ability to remove distributed map cache entries according to a regular expression

    [ https://issues.apache.org/jira/browse/NIFI-3627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16169618#comment-16169618 ] 

Minmin DU commented on NIFI-3627:
---------------------------------

Hi there, 

I think it is good to explore this method to a NiFi processor so that it provides flexibility for end user to remove a signal manually. It will be greatly useful from operation prospective. In our project, we had to create a custom NiFi processor to call this method specifically.

In addition, I noticed that all entries in distribute map cache will be gone after restarting NiFi. Is there any way to persist the cache to a disk in case NiFi is down ?

Thanks a lot. 


Cheers,
Minmin

> Add ability to remove distributed map cache entries according to a regular expression
> -------------------------------------------------------------------------------------
>
>                 Key: NIFI-3627
>                 URL: https://issues.apache.org/jira/browse/NIFI-3627
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Matt Burgess
>            Assignee: Matt Burgess
>             Fix For: 1.2.0
>
>
> The DistributedMapCacheClient interface has the ability to remove an individual entry based on a specified key. For large numbers of key/value pairs, this becomes unwieldy as a processor using this would have to keep track of all the keys it has stored, thereby lessening the effectiveness of the cache.
> Alternatively, I propose a method be added that will remove keys based on a regular expression (regex) pattern; this way a processor could prefix a value to each key (such as the UUID of the processor itself), and remove all such keys when it deems prudent.  The method could be as simple as:
> void remove(String pattern)
> or perhaps it could return boolean (true if any key was deleted, false otherwise) or an int (the number of deleted keys)
> Note that in order to match the pattern, the key Serializer used must generate keys that the regex can match.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)