hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r1043314 - in /hadoop/hdfs/trunk: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Date Wed, 08 Dec 2010 05:52:51 GMT
Author: cos
Date: Wed Dec  8 05:52:51 2010
New Revision: 1043314

URL: http://svn.apache.org/viewvc?rev=1043314&view=rev
Log:
HDFS-1531. Clean up stack traces due to duplicate MXBean registration.  Contributed by Todd
Lipcon.

Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
    hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=1043314&r1=1043313&r2=1043314&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Wed Dec  8 05:52:51 2010
@@ -434,6 +434,9 @@ Release 0.22.0 - Unreleased
     HDFS-1527. SocketOutputStream.transferToFully fails for blocks >= 2GB on
     32 bit JVM. (Patrick Kling via cos)
 
+    HDFS-1531. Clean up stack traces due to duplicate MXBean registration.
+    (Todd Lipcon via cos)
+
 Release 0.21.1 - Unreleased
 
   IMPROVEMENTS

Modified: hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java?rev=1043314&r1=1043313&r2=1043314&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java (original)
+++ hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java Wed Dec
 8 05:52:51 2010
@@ -526,8 +526,11 @@ public class DataNode extends Configured
     try {
       ObjectName mxbeanName = new ObjectName("HadoopInfo:type=DataNodeInfo");
       mbs.registerMBean(this, mxbeanName);
+    } catch ( javax.management.InstanceAlreadyExistsException iaee ) {
+      // in unit tests, we may have multiple datanodes in the same JVM
+      LOG.info("DataNode MXBean already registered");
     } catch ( javax.management.JMException e ) {
-      LOG.warn("Failed to register NameNode MXBean", e);
+      LOG.warn("Failed to register DataNode MXBean", e);
     }
   }
 

Modified: hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java?rev=1043314&r1=1043313&r2=1043314&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java (original)
+++ hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Wed
Dec  8 05:52:51 2010
@@ -5128,6 +5128,9 @@ public class FSNamesystem implements FSC
     try {
       ObjectName mxbeanName = new ObjectName("HadoopInfo:type=NameNodeInfo");
       mbs.registerMBean(this, mxbeanName);
+    } catch ( javax.management.InstanceAlreadyExistsException iaee ) {
+      // in unit tests, we may run and restart the NN within the same JVM
+      LOG.info("NameNode MXBean already registered");
     } catch ( javax.management.JMException e ) {
       LOG.warn("Failed to register NameNodeMXBean", e);
     }



Mime
View raw message