From 9d3fcdfbb314c83ba6185e4ac8de649dad51a279 Mon Sep 17 00:00:00 2001 From: Robert Kanter Date: Wed, 4 May 2016 22:42:21 -0700 Subject: [PATCH] MAPREDUCE-6675. TestJobImpl.testUnusableNode failed (haibochen via rkanter) --- .../apache/hadoop/mapreduce/v2/app/job/impl/TestJobImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestJobImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestJobImpl.java index fa0aef3bc8..36221e0500 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestJobImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestJobImpl.java @@ -531,7 +531,7 @@ public void testUnusableNodeTransition() throws Exception { Configuration conf = new Configuration(); conf.set(MRJobConfig.MR_AM_STAGING_DIR, stagingDir); conf.setInt(MRJobConfig.NUM_REDUCES, 1); - AsyncDispatcher dispatcher = new AsyncDispatcher(); + DrainDispatcher dispatcher = new DrainDispatcher(); dispatcher.init(conf); dispatcher.start(); CyclicBarrier syncBarrier = new CyclicBarrier(2); @@ -608,6 +608,7 @@ public void handle(TaskAttemptEvent event) { NodeReport secondMapperNodeReport = nodeReports.get(1); job.handle(new JobUpdatedNodesEvent(job.getID(), Collections.singletonList(firstMapperNodeReport))); + dispatcher.await(); // complete the reducer for (TaskId taskId: job.tasks.keySet()) { if (taskId.getTaskType() == TaskType.REDUCE) {