hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1295240 - in /hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt src/main/java/org/apache/hadoop/metrics2/util/MBeans.java
Date Wed, 29 Feb 2012 19:57:44 GMT
Author: szetszwo
Date: Wed Feb 29 19:57:43 2012
New Revision: 1295240

URL: http://svn.apache.org/viewvc?rev=1295240&view=rev
Log:
HADOOP-8118.  In metrics2.util.MBeans, change log level to trace for the stack trace of InstanceAlreadyExistsException.

Modified:
    hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/MBeans.java

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1295240&r1=1295239&r2=1295240&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Wed Feb 29 19:57:43
2012
@@ -160,6 +160,9 @@ Release 0.23.3 - UNRELEASED 
     HADOOP-8098. KerberosAuthenticatorHandler should use _HOST replacement to 
     resolve principal name (tucu)
 
+    HADOOP-8118.  In metrics2.util.MBeans, change log level to trace for the
+    stack trace of InstanceAlreadyExistsException.  (szetszwo)
+
   OPTIMIZATIONS
 
   BUG FIXES

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/MBeans.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/MBeans.java?rev=1295240&r1=1295239&r2=1295240&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/MBeans.java
(original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/MBeans.java
Wed Feb 29 19:57:43 2012
@@ -18,6 +18,8 @@
 package org.apache.hadoop.metrics2.util;
 
 import java.lang.management.ManagementFactory;
+
+import javax.management.InstanceAlreadyExistsException;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
@@ -55,8 +57,15 @@ public class MBeans {
       mbs.registerMBean(theMbean, name);
       LOG.debug("Registered "+ name);
       return name;
+    } catch (InstanceAlreadyExistsException iaee) {
+      if (LOG.isTraceEnabled()) {
+        LOG.trace("Failed to register MBean \""+ name + "\"", iaee);
+      } else {
+        LOG.warn("Failed to register MBean \""+ name
+            + "\": Instance already exists.");
+      }
     } catch (Exception e) {
-      LOG.warn("Error registering "+ name, e);
+      LOG.warn("Failed to register MBean \""+ name + "\"", e);
     }
     return null;
   }



Mime
View raw message