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

Mike Percy commented on FLUME-1940:
-----------------------------------

Israel, very nice! This is a great start.

Some suggestions:
1. It would be great to add this generic logging functionality to 
MonitoredCounterGroup
2. Do the same as you did with ChannelCounter to SourceCounter and SinkCounter 
and just call the above impl from stop()
3. It would be great to sort the metric key names before printing. As an 
example:
{noformat}
List<String> keys = new ArrayList<String>(getCounterMap().keySet());
Collections.sort(keys);
for (String key : keys) { ... }
{noformat}

4. Nit: minor indentation issue in the new MonitoredCounterGroup.getName() 
method (but you may not need to expose that if the impl is there)
5. It would be great to also post this patch on https://reviews.apache.org/ per 
https://cwiki.apache.org/confluence/display/FLUME/How+to+Contribute#HowtoContribute-ProvidingPatches
 - use group Flume - and cross-link them. See other reviews at 
https://reviews.apache.org/groups/Flume/ as an example

Thanks!
                
> Log a snapshot of Flume metrics on shutdown
> -------------------------------------------
>
>                 Key: FLUME-1940
>                 URL: https://issues.apache.org/jira/browse/FLUME-1940
>             Project: Flume
>          Issue Type: Improvement
>    Affects Versions: v1.3.1
>            Reporter: Mike Percy
>            Assignee: Israel Ekpo
>            Priority: Minor
>              Labels: noob
>             Fix For: v1.4.0
>
>         Attachments: FLUME-1940.patch
>
>
> It would be great to log a JMX snapshot to the flume.log at Flume shutdown 
> time.

--
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

Reply via email to