Merge -c 1488840 from trunk to branch-2 to fix YARN-730. Fix NMClientAsync to remove completed containers. Contributed by Zhijie Shen.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1488841 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8ecc0ba26f
commit
62ab1db78b
|
@ -386,6 +386,9 @@ Release 2.1.0-beta - UNRELEASED
|
||||||
YARN-733. Fixed TestNMClient from failing occasionally. (Zhijie Shen via
|
YARN-733. Fixed TestNMClient from failing occasionally. (Zhijie Shen via
|
||||||
vinodkv)
|
vinodkv)
|
||||||
|
|
||||||
|
YARN-730. Fix NMClientAsync to remove completed containers. (Zhijie Shen
|
||||||
|
via acmurthy)
|
||||||
|
|
||||||
BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS
|
BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS
|
||||||
|
|
||||||
YARN-158. Yarn creating package-info.java must not depend on sh.
|
YARN-158. Yarn creating package-info.java must not depend on sh.
|
||||||
|
|
|
@ -615,6 +615,9 @@ public class NMClientAsync extends AbstractService {
|
||||||
LOG.info("Container " + containerId + " is already stopped or failed");
|
LOG.info("Container " + containerId + " is already stopped or failed");
|
||||||
} else {
|
} else {
|
||||||
container.handle(event);
|
container.handle(event);
|
||||||
|
if (isCompletelyDone(container)) {
|
||||||
|
containers.remove(containerId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,6 +122,8 @@ public class TestNMClientAsync {
|
||||||
}
|
}
|
||||||
Assert.assertEquals("Error occurs in ContainerEventProcessor", 0,
|
Assert.assertEquals("Error occurs in ContainerEventProcessor", 0,
|
||||||
((MockNMClientAsync1) asyncClient).errorMsgs.size());
|
((MockNMClientAsync1) asyncClient).errorMsgs.size());
|
||||||
|
Assert.assertEquals("Completed container is not removed", 0,
|
||||||
|
asyncClient.containers.size());
|
||||||
asyncClient.stop();
|
asyncClient.stop();
|
||||||
Assert.assertFalse(
|
Assert.assertFalse(
|
||||||
"The thread of Container Management Event Dispatcher is still alive",
|
"The thread of Container Management Event Dispatcher is still alive",
|
||||||
|
|
Loading…
Reference in New Issue