瀏覽代碼

HDFS-3328. svn merge -c 1336480 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2.0.0-alpha@1336482 13f79535-47bb-0310-9956-ffa450edef68
Eli Collins 13 年之前
父節點
當前提交
bcf51d35ba

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -505,6 +505,8 @@ Release 2.0.0 - UNRELEASED
     HDFS-3157. Error in deleting block is keep on coming from DN even after 
     HDFS-3157. Error in deleting block is keep on coming from DN even after 
     the block report and directory scanning has happened. (Ashish Singhi via umamahesh)
     the block report and directory scanning has happened. (Ashish Singhi via umamahesh)
 
 
+    HDFS-3328. NPE in DataNode.getIpcPort. (eli)
+
   BREAKDOWN OF HDFS-1623 SUBTASKS
   BREAKDOWN OF HDFS-1623 SUBTASKS
 
 
     HDFS-2179. Add fencing framework and mechanisms for NameNode HA. (todd)
     HDFS-2179. Add fencing framework and mechanisms for NameNode HA. (todd)

+ 1 - 2
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java

@@ -864,7 +864,7 @@ public class DataNode extends Configured
    */
    */
   public String getDisplayName() {
   public String getDisplayName() {
     // NB: our DatanodeID may not be set yet
     // NB: our DatanodeID may not be set yet
-    return hostName + ":" + getIpcPort();
+    return hostName + ":" + getXferPort();
   }
   }
 
 
   /**
   /**
@@ -881,7 +881,6 @@ public class DataNode extends Configured
   /**
   /**
    * @return the datanode's IPC port
    * @return the datanode's IPC port
    */
    */
-  @VisibleForTesting
   public int getIpcPort() {
   public int getIpcPort() {
     return ipcServer.getListenerAddress().getPort();
     return ipcServer.getListenerAddress().getPort();
   }
   }