hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r738936 - in /hadoop/core/branches/branch-0.20: CHANGES.txt src/core/org/apache/hadoop/ipc/RPC.java
Date Thu, 29 Jan 2009 17:41:34 GMT
Author: szetszwo
Date: Thu Jan 29 17:41:34 2009
New Revision: 738936

URL: http://svn.apache.org/viewvc?rev=738936&view=rev
Log:
HADOOP-5139. Catch IllegalArgumentException during metrics registration in RPC.  (Hairong
Kuang via szetszwo)

Modified:
    hadoop/core/branches/branch-0.20/CHANGES.txt
    hadoop/core/branches/branch-0.20/src/core/org/apache/hadoop/ipc/RPC.java

Modified: hadoop/core/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/CHANGES.txt?rev=738936&r1=738935&r2=738936&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.20/CHANGES.txt Thu Jan 29 17:41:34 2009
@@ -647,6 +647,9 @@
     HADOOP-4862. Minor : HADOOP-3678 did not remove all the cases of 
     spurious IOExceptions logged by DataNode. (Raghu Angadi) 
 
+    HADOOP-5139. Catch IllegalArgumentException during metrics registration
+    in RPC.  (Hairong Kuang via szetszwo)
+
 Release 0.19.0 - 2008-11-18
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/branches/branch-0.20/src/core/org/apache/hadoop/ipc/RPC.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/core/org/apache/hadoop/ipc/RPC.java?rev=738936&r1=738935&r2=738936&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/core/org/apache/hadoop/ipc/RPC.java (original)
+++ hadoop/core/branches/branch-0.20/src/core/org/apache/hadoop/ipc/RPC.java Thu Jan 29 17:41:34
2009
@@ -519,8 +519,15 @@
         MetricsTimeVaryingRate m =
          (MetricsTimeVaryingRate) rpcMetrics.registry.get(call.getMethodName());
       	if (m == null) {
-      	  m = new MetricsTimeVaryingRate(call.getMethodName(),
+      	  try {
+      	    m = new MetricsTimeVaryingRate(call.getMethodName(),
       	                                        rpcMetrics.registry);
+      	  } catch (IllegalArgumentException iae) {
+      	    // the metrics has been registered; re-fetch the handle
+      	    LOG.info("Error register " + call.getMethodName(), iae);
+      	    m = (MetricsTimeVaryingRate) rpcMetrics.registry.get(
+      	        call.getMethodName());
+      	  }
       	}
         m.inc(processingTime);
 



Mime
View raw message