Issue Details (XML | Word | Printable)

Key: HADOOP-2886
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: dhruba borthakur
Reporter: girish vaitheeswaran
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

Track individual RPC metrics.

Created: 22/Feb/08 11:14 PM   Updated: 21/May/08 08:05 PM
Return to search
Component/s: metrics
Affects Version/s: None
Fix Version/s: 0.17.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works rpc-metrics.patch 2008-02-27 10:35 PM girish vaitheeswaran 5 kB
Text File rpc-metrics.patch 2008-02-26 08:59 PM girish vaitheeswaran 8 kB
File rpc-metrics.path 2008-02-25 10:36 PM girish vaitheeswaran 7 kB
Text File Licensed for inclusion in ASF works rpcmetrics.patch 2008-03-19 05:21 PM girish vaitheeswaran 3 kB
Text File Licensed for inclusion in ASF works rpcmetrics.patch 2008-03-13 06:03 PM girish vaitheeswaran 3 kB
Text File Licensed for inclusion in ASF works rpcmetrics.patch 2008-03-13 01:12 AM girish vaitheeswaran 3 kB

Resolution Date: 20/Mar/08 05:06 PM


 Description  « Hide
There is currently no mechanism to track performance metrics at the granularity of a specific RPC. So For e.g. if we wanted to capture average latency for the openFile RPC or for the createFile RPC the current infrastructure does not support that.

The implementation involves having a simple HashMap where every new Rpc metric being added would be inserted into the HashMap. Since there is a mechanism to obtain RPC latencies already (without the name of the specific RPC), the identification of what RPC is involved would be done by doing a lookup on the HashMap.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
girish vaitheeswaran added a comment - 25/Feb/08 10:36 PM
Here is a brief description of the change

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.


girish vaitheeswaran added a comment - 29/Feb/08 12:16 AM
No tests added since this is a minor enhanacement localized to the rpc metrics code path.

girish vaitheeswaran added a comment - 13/Mar/08 01:12 AM
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.

Sanjay Radia added a comment - 13/Mar/08 04:59 PM
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
conflicts with rpc methods of the same name.
Hence I suggest that you append the method metrics by "OP_" or something like that.
(Which has the advantage that it obvious that the metrics is an rpc operation/method)

Alternatively you could prefix the static ones by a "_" or something that would not
conflic with method names (since java does not allow methods to start with that character).
This would be cheaper in cost but would break compatibility with the metrics xml file.


girish vaitheeswaran added a comment - 13/Mar/08 06:01 PM
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.


Sanjay Radia added a comment - 18/Mar/08 12:25 AM
+1

Hadoop QA added a comment - 19/Mar/08 11:05 AM
-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.
Please justify why no tests are needed for this patch.

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/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1994/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1994/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1994/console

This message is automatically generated.


girish vaitheeswaran added a comment - 19/Mar/08 01:56 PM
This patch does not require any new tests.

dhruba borthakur added a comment - 19/Mar/08 05:10 PM
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.

http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1994/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html


girish vaitheeswaran added a comment - 19/Mar/08 05:21 PM
New patch with findbug warning fixes.

girish vaitheeswaran added a comment - 19/Mar/08 05:22 PM
Done. New patch with findbug warning fixes has been uploaded.

Thanks
-girish


Hadoop QA added a comment - 20/Mar/08 07:28 AM
-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.
Please justify why no tests are needed for this patch.

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/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2007/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2007/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2007/console

This message is automatically generated.


dhruba borthakur added a comment - 20/Mar/08 05:06 PM
I just committed this. Thanks Girish!

girish vaitheeswaran added a comment - 20/Mar/08 05:29 PM
Thanks Dhruba,
-girish

Hudson added a comment - 21/Mar/08 12:17 PM