This is an automated email from the ASF dual-hosted git repository.
gifuma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new fec9bf4 YARN-9501.
TestCapacitySchedulerOvercommit#testReducePreemptAndCancel fails intermittent.
Contributed by Prabhu Joseph.
fec9bf4 is described below
commit fec9bf4b0ba82f46f663ebb6310fd28c5315d0d7
Author: Giovanni Matteo Fumarola <[email protected]>
AuthorDate: Tue Apr 23 15:42:56 2019 -0700
YARN-9501. TestCapacitySchedulerOvercommit#testReducePreemptAndCancel fails
intermittent. Contributed by Prabhu Joseph.
---
.../resourcemanager/scheduler/TestSchedulerOvercommit.java | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestSchedulerOvercommit.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestSchedulerOvercommit.java
index cc665fb..758fd33 100644
---
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestSchedulerOvercommit.java
+++
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestSchedulerOvercommit.java
@@ -286,6 +286,9 @@ public abstract class TestSchedulerOvercommit {
updateNodeResource(rm, nmId, 2 * GB, 2, timeout);
waitMemory(scheduler, nm, 4 * GB, -2 * GB, INTERVAL, timeout);
+ // wait until MARK_CONTAINER_FOR_PREEMPTION is handled
+ rm.drainEvents();
+
// We should receive a notification to preempt the container
PreemptionMessage preemptMsg = am.schedule().getPreemptionMessage();
assertPreemption(container.getId(), preemptMsg);
@@ -315,13 +318,16 @@ public abstract class TestSchedulerOvercommit {
Container container = createContainer(am, 2 * GB);
assertMemory(scheduler, nmId, 4 * GB, 0);
- // We give an overcommit time out of 2 seconds
+ // We give an overcommit time out of 1 seconds
final int timeout = (int)TimeUnit.SECONDS.toMillis(1);
// Reducing to 2GB should first preempt the container
updateNodeResource(rm, nmId, 2 * GB, 2, timeout);
waitMemory(scheduler, nm, 4 * GB, -2 * GB, INTERVAL, timeout);
+ // wait until MARK_CONTAINER_FOR_PREEMPTION is handled
+ rm.drainEvents();
+
// We should receive a notification to preempt the container
PreemptionMessage preemptMsg = am.schedule().getPreemptionMessage();
assertPreemption(container.getId(), preemptMsg);
@@ -479,6 +485,9 @@ public abstract class TestSchedulerOvercommit {
updateNodeResource(rm, nmId, 3 * GB, 2, 2 * 1000);
waitMemory(scheduler, nmId, 5 * GB, -2 * GB, 200, 5 * 1000);
+ // wait until MARK_CONTAINER_FOR_PREEMPTION is handled
+ rm.drainEvents();
+
PreemptionMessage preemptMsg = am.schedule().getPreemptionMessage();
assertPreemption(c2.getId(), preemptMsg);
@@ -493,6 +502,9 @@ public abstract class TestSchedulerOvercommit {
updateNodeResource(rm, nmId, 3 * GB, 2, 2 * 1000);
waitMemory(scheduler, nmId, 5 * GB, -2 * GB, 200, 5 * 1000);
+ // wait until MARK_CONTAINER_FOR_PREEMPTION is handled
+ rm.drainEvents();
+
preemptMsg = am.schedule().getPreemptionMessage();
assertPreemption(c2.getId(), preemptMsg);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]