hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r738934 - in /hadoop/core/trunk: CHANGES.txt src/core/org/apache/hadoop/ipc/RPC.java
Date Thu, 29 Jan 2009 17:36:10 GMT
Author: szetszwo
Date: Thu Jan 29 17:36:10 2009
New Revision: 738934

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

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/core/org/apache/hadoop/ipc/RPC.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=738934&r1=738933&r2=738934&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Jan 29 17:36:10 2009
@@ -71,6 +71,9 @@
     HADOOP-5045. FileSystem.isDirectory() should not be deprecated.  (Suresh
     Srinivas via szetszwo)
 
+    HADOOP-5139. Catch IllegalArgumentException during metrics registration 
+    in RPC.  (Hairong Kuang via szetszwo)
+
 Release 0.20.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/ipc/RPC.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/ipc/RPC.java?rev=738934&r1=738933&r2=738934&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/ipc/RPC.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/ipc/RPC.java Thu Jan 29 17:36:10 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