HDFS-3940. Merging change r1465851 from trunk

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

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

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1466181 13f79535-47bb-0310-9956-ffa450edef68
YARN-112. Fixed a race condition during localization that fails containers. Contributed by Omkar Vinit Joshi.
MAPREDUCE-5138. Fix LocalDistributedCacheManager after YARN-112. Contributed by Omkar Vinit Joshi.
svn merge --ignore-ancestry -c 1466196 ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1466197 13f79535-47bb-0310-9956-ffa450edef68
YARN-534. Change RM restart recovery to also account for AM max-attempts configuration after the restart. Contributed by Jian He.
svn merge --ignore-ancestry -c 1466208 ../../trunk/


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