hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r897679 - in /hadoop/hdfs/trunk: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
Date Sun, 10 Jan 2010 18:21:12 GMT
Author: stevel
Date: Sun Jan 10 18:21:12 2010
New Revision: 897679

URL: http://svn.apache.org/viewvc?rev=897679&view=rev
Log:
HDFS-885. Datanode toString() NPEs on null dnRegistration.

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

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=897679&r1=897678&r2=897679&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Sun Jan 10 18:21:12 2010
@@ -88,6 +88,8 @@
     (Todd Lipcon via szetszwo)
     
     HDFS-775. FSDataset calls getCapacity() twice. (stevel)
+    
+    HDFS-885. Datanode toString() NPEs on null dnRegistration. (stevel)
 
 Release 0.21.0 - Unreleased
 

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=897679&r1=897678&r2=897679&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 Sun Jan
10 18:21:12 2010
@@ -1422,8 +1422,10 @@
   public String toString() {
     return "DataNode{" +
       "data=" + data +
-      ", localName='" + dnRegistration.getName() + "'" +
-      ", storageID='" + dnRegistration.getStorageID() + "'" +
+      (dnRegistration != null ?
+          (", localName='" + dnRegistration.getName() + "'" +
+              ", storageID='" + dnRegistration.getStorageID() + "'")
+          : "") +
       ", xmitsInProgress=" + xmitsInProgress.get() +
       "}";
   }



Mime
View raw message