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

This commit is contained in:
Arpit Agarwal 2015-06-14 20:18:31 -07:00
parent 1145d09e0a
commit a1810d75f0
2 changed files with 4 additions and 2 deletions

View File

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

View File

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