HDFS-6667. Merge change r1611508 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1611510 13f79535-47bb-0310-9956-ffa450edef68
Merge r1611512 from trunk: YARN-1341. Recover NMTokens upon nodemanager restart. (Contributed by Jason Lowe)

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