HADOOP-9877. Fix listing of snapshot directories in globStatus. (Binglin Chang via Andrew Wang)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1516236 13f79535-47bb-0310-9956-ffa450edef68
HDFS-5069. Merging change r1516232 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1516239 13f79535-47bb-0310-9956-ffa450edef68
MAPREDUCE-5466. Changed MR AM to not promote history files of intermediate AMs in case they are exiting because of errors and thus help history-server pick up the right history file for the last successful AM. Contributed by Jian He.
svn merge --ignore-ancestry -c 1516238 ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1516240 13f79535-47bb-0310-9956-ffa450edef68
svn merge -c 1516237 merging from trunk to branch-2 to fix HDFS-4994.

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