HDFS-6552: Merging r1603602 from trunk to branch-2.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1603603 13f79535-47bb-0310-9956-ffa450edef68
HDFS-6551. Merge r1603612 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1603615 13f79535-47bb-0310-9956-ffa450edef68