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

Sebastian Kruse commented on FLINK-1096:
----------------------------------------

That seems to be a good idea. You have to provide a write and read function for 
accumulators, though. For user-defined keys, you would need user-defined 
serialization functions as well. Moreover, I think that counted values are in 
general not comparable, e.g., some kind of arrays or so.

I would suggest to have some standard histograms, e.g. for longs/ints and 
strings, and maybe an abstract base class for user-defined keys.

> Unexpected Histogram accumulator behavior
> -----------------------------------------
>
>                 Key: FLINK-1096
>                 URL: https://issues.apache.org/jira/browse/FLINK-1096
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Sebastian Kruse
>            Assignee: Sebastian Kruse
>            Priority: Trivial
>
> The {{Histogram}} accumulator uses the given value as both key and value for 
> the histogram map. Hence, the histogram always contains entries like {{key -> 
> n * key}} where {{n}} is the number of times that {{key}} has been added to 
> the histogram.
> Supposedly, adding {{key}} into the histogram {{n}} times should create the 
> entr {{key -> n}} instead.



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

Reply via email to