|
No tests added since this is a minor enhanacement localized to the rpc metrics code path.
New patch that takes into account the ability to dynamically add new metrics as new rpc's come on board. No extra code is needed.
Looks good.
2 comments. 1. Hadoop brace style is std java brace style if ( ) { <- brace is here, not on next line xxxx } synchronized ( xxx) { } 2. Since there are some static metrics such as RpcQueueTime there is a potential of Alternatively you could prefix the static ones by a "_" or something that would not Thanks sanjay.
1. Braces have been fixed. 2. pushMetric appends _ops and _avg_time to the name of the metric, so even in the case of the rpc methods these would get appended. I have uploaded the latest patch with the braces fixed. -1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12377815/rpcmetrics.patch against trunk revision 619744. @author +1. The patch does not contain any @author tags. tests included -1. The patch doesn't appear to include any new or modified tests. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new javac compiler warnings. release audit +1. The applied patch does not generate any new release audit warnings. findbugs -1. The patch appears to introduce 1 new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1994/testReport/ This message is automatically generated. This patch does not require any new tests.
There seems to be one findbugs warning that was caught by the HadoopQA tests. It would be nice if you can fix them and resubmit the patch.
New patch with findbug warning fixes.
Done. New patch with findbug warning fixes has been uploaded.
Thanks -1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12378255/rpcmetrics.patch against trunk revision 619744. @author +1. The patch does not contain any @author tags. tests included -1. The patch doesn't appear to include any new or modified tests. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new javac compiler warnings. release audit +1. The applied patch does not generate any new release audit warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2007/testReport/ This message is automatically generated. I just committed this. Thanks Girish!
Thanks Dhruba,
-girish Integrated in Hadoop-trunk #435 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/435/
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MetricsTimeVaryingRate.java
+ mr.incrMetric(name + "_avg_time", (int)getPreviousIntervalAverageTime());
Cast needed since we are converting a long field to an integer and the methid incrMetric does not have a method accepting a long field.
RPC.java
This file deals with dynamically obtaining the rpc latency based on the name of the rpc.
RpcMetrics.java
This file deals with generating the hashmap for the different RPC's.