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

ASF GitHub Bot commented on NIFI-3627:
--------------------------------------

GitHub user mattyb149 opened a pull request:

    https://github.com/apache/nifi/pull/1609

    NIFI-3627: Added removeByPattern() to DistributedMapCache interfaces

    Also removed old conditions preventing the tests from running on OS X with 
Java 8.
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
    - [x] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mattyb149/nifi NIFI-3627

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/1609.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1609
    
----
commit c897b9880e08b13a064c00dde4c91e489335309d
Author: Matt Burgess <[email protected]>
Date:   2017-03-21T22:15:54Z

    NIFI-3627: Added removeByPattern() to DistributedMapCache interfaces

----


> 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
>
> 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.3.15#6346)

Reply via email to