HDFS-4876. Merging change r1490117 from branch-2.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2.1-beta@1490877 13f79535-47bb-0310-9956-ffa450edef68
HDFS-4850. Merging change r1490084 from branch-2

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2.1-beta@1490883 13f79535-47bb-0310-9956-ffa450edef68
HDFS-4877. Merging r1490430 from branch-2.

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