HADOOP-8562. Merge r1477427 for HDFS-4610, r1477408 for YARN-506, r1477403 for MAPREDUCE-5177

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