[
https://issues.apache.org/jira/browse/FLUME-1411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454516#comment-13454516
]
Hari Shreedharan commented on FLUME-1411:
-----------------------------------------
My intention was just to show the averages events/sec since the component
started. So I didn't really have reset() in mind. What purpose does a reset()
method serve? The mbean is not visible from outside the component, so when
would you reset the average? I don't really see any need for a reset. Simply
implementing getAverage would be enough.
Note: Mbean methods are simply getters. They do not take an argument. So you
would have a method called getAverageEventRate() or something, in the
ChannelCounter interface, and its implementation in ChannelCounter class.
An easy way to implement this is to have 2 methods, one for average puts per
second, and one for average takes per second. Use the existing mbean data like
putSuccessCount and startTime to calculate the average.
> Add average events per second params to MBeans
> ----------------------------------------------
>
> Key: FLUME-1411
> URL: https://issues.apache.org/jira/browse/FLUME-1411
> Project: Flume
> Issue Type: Bug
> Components: Sinks+Sources
> Affects Versions: v1.2.0
> Reporter: Hari Shreedharan
> Fix For: v1.3.0
>
>
> I know this might cause the platform mbean thread longer to poll, since we
> will need to do some calculation - but it is definitely nice to have historic
> averages.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira