Browse Source

HDFS-8600. TestWebHdfsFileSystemContract.testGetFileBlockLocations fails in branch-2.7. (Contributed by Arpit Agarwal)

Arpit Agarwal 10 years ago
parent
commit
a1810d75f0

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

@@ -122,6 +122,9 @@ Release 2.7.1 - UNRELEASED
     HDFS-8595. TestCommitBlockSynchronization fails in branch-2.7. (Patch
     applies to all branches). (Arpit Agarwal)
 
+    HDFS-8600. TestWebHdfsFileSystemContract.testGetFileBlockLocations fails
+    in branch-2.7. (Arpit Agarwal)
+
 Release 2.7.0 - 2015-04-20
 
   INCOMPATIBLE CHANGES

+ 1 - 2
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/JsonUtil.java

@@ -334,10 +334,9 @@ public class JsonUtil {
 
     // Handle the case of old servers (1.x, 0.23.x) sending 'name' instead
     // of ipAddr and xferPort.
+    int xferPort = getInt(m, "xferPort", -1);
     Object tmpValue = m.get("ipAddr");
     String ipAddr = (tmpValue == null) ? null : (String)tmpValue;
-    tmpValue = m.get("xferPort");
-    int xferPort = (tmpValue == null) ? -1 : (int)(long)(Long)tmpValue;
     if (ipAddr == null) {
       tmpValue = m.get("name");
       if (tmpValue != null) {