HDFS-4969. WebhdfsFileSystem expects non-standard WEBHDFS Json element. (rkanter via tucu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1501870 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alejandro Abdelnur 2013-07-10 17:35:44 +00:00
parent 66b20f8486
commit 944401defd
2 changed files with 6 additions and 1 deletions

View File

@ -973,6 +973,9 @@ Release 2.1.0-beta - 2013-07-02
HDFS-4951. FsShell commands using secure httpfs throw exceptions due HDFS-4951. FsShell commands using secure httpfs throw exceptions due
to missing TokenRenewer. (rknater via tucu) to missing TokenRenewer. (rknater via tucu)
HDFS-4969. WebhdfsFileSystem expects non-standard WEBHDFS Json element.
(rkanter via tucu)
Release 2.0.5-alpha - 06/06/2013 Release 2.0.5-alpha - 06/06/2013
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -248,7 +248,9 @@ public static HdfsFileStatus toFileStatus(final Map<?, ?> json, boolean includes
final short replication = (short) (long) (Long) m.get("replication"); final short replication = (short) (long) (Long) m.get("replication");
final long fileId = m.containsKey("fileId") ? (Long) m.get("fileId") final long fileId = m.containsKey("fileId") ? (Long) m.get("fileId")
: INodeId.GRANDFATHER_INODE_ID; : INodeId.GRANDFATHER_INODE_ID;
final int childrenNum = (int) (long) (Long) m.get("childrenNum"); Long childrenNumLong = (Long) m.get("childrenNum");
final int childrenNum = (childrenNumLong == null) ? 0
: childrenNumLong.intValue();
return new HdfsFileStatus(len, type == PathType.DIRECTORY, replication, return new HdfsFileStatus(len, type == PathType.DIRECTORY, replication,
blockSize, mTime, aTime, permission, owner, group, blockSize, mTime, aTime, permission, owner, group,
symlink, DFSUtil.string2Bytes(localName), fileId, childrenNum); symlink, DFSUtil.string2Bytes(localName), fileId, childrenNum);