Merge r1611126 from trunk. YARN-2264. Fixed a race condition in DrainDispatcher which may cause random test failures. Contributed by Li Lu

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1611127 13f79535-47bb-0310-9956-ffa450edef68
HADOOP-10839. Merging change r1611134 from trunk to branch-2.

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