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

Koji Kawamura commented on NIFI-3216:
-------------------------------------

[~bbende] I agree with the idea of adding atomic replace method, instead of 
making cache engine capable of returning all keys or query keys that can be 
costly or not practical with some cache engines especially distributed ones.

I think it'd be also beneficial to add 'result state' semantics into the count.
For example, there're 1,000 entries in the original input, then those are split 
and processed in downstream flow, then some of those can succeed while some 
fail, with this partially success scenario, users may want to change subsequent 
flow based on the failure rate.
This can be done with following JSON:

{code}
{
  "counts" : {
    "success": 995,
    "failure": 5
  },
  "attributes" : {
     "attr1" : "val1",
     "attr2" : "val2"
  }
}
{code}

So that Wait processor can check whether total count reaches desired count, and 
also add more context for further processing. The name of counts can be 
anything, not limited to success/failure distinction. Add optional property to 
Notify processor to specify the name of count.

> Add ability to wait for N signals to Wait/Notify processors
> -----------------------------------------------------------
>
>                 Key: NIFI-3216
>                 URL: https://issues.apache.org/jira/browse/NIFI-3216
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 1.2.0
>            Reporter: Bryan Bende
>
> The recently added Wait and Notify processors allow a flow file to be held at 
> the Wait processor until a signal is received in the Notify processor. It 
> would be nice to be able to wait for N signals before releasing.
> One way this could be done is to have a property like "Signal Count" on the 
> Wait processor, and then count the keys in the cache starting with some 
> pattern, and release when the # of keys equals the signal count.
> This would require the ability to get all the keys from the cache, or at 
> least get all keys matching a pattern: 
> https://issues.apache.org/jira/browse/NIFI-3214



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to