MAPREDUCE-6675. TestJobImpl.testUnusableNode failed (haibochen via rkanter)

(cherry picked from commit 9d3fcdfbb3)
This commit is contained in:
Robert Kanter 2016-05-04 22:42:21 -07:00 committed by Eric Payne
parent a631247c2a
commit d738f4b652
1 changed files with 2 additions and 1 deletions

View File

@ -531,7 +531,7 @@ public class TestJobImpl {
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 class TestJobImpl {
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) {