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

Aljoscha Krettek commented on FLINK-3758:
-----------------------------------------

Yes, I think it should work but we would need to add another method that does 
both {{addAccumulator()}} and {{getAccumulator()}} in one function. Right now, 
you have to do {{addAccumulator()}} one time and then in the future use 
{{getAccumulator()}}. In the {{Trigger}} we would not know when to call 
{{addAccumulator()}}. This new method could be called 
{{getOrAddAccumulator()}}, or just {{getAccumulator(String name, Accumulator 
defaultAccumulator)}}. (I prefer the second name.)

> Add possibility to register accumulators in custom triggers
> -----------------------------------------------------------
>
>                 Key: FLINK-3758
>                 URL: https://issues.apache.org/jira/browse/FLINK-3758
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Konstantin Knauf
>            Priority: Minor
>
> For monitoring purposes it would be nice to be able to to use accumulators in 
> custom trigger functions. 
> Basically, the trigger context could just expose {{getAccumulator}} of 
> {{RuntimeContext}} or does this create problems I am not aware of?
> Adding accumulators in a trigger function is more difficult, I think, but 
> that's not really neccessary as the accummulator could just be added in some 
> other upstream operator.



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

Reply via email to