Package org.apache.hadoop.mapred.FakeObjectUtilities

Examples of org.apache.hadoop.mapred.FakeObjectUtilities.FakeJobInProgress.findReduceTask()


    taskAttemptID[5] = job.findReduceTask(trackers[4]);
    assertEquals(taskAttemptID[5].getTaskID().getId(),2);
    clock.advance(5000);
    job.finishTask(taskAttemptID[5]);
   
    taskAttemptID[5] = job.findReduceTask(trackers[4]);
    assertEquals(taskAttemptID[5].getTaskID().getId(),3);
   
  }
 
  /*
 
View Full Code Here


   
    // finish the map task
    job.finishTask(tid[1]);

    // finish the reduce task
    tid[2] =  job.findReduceTask(trackers[1]);
    job.finishTask(tid[2]);
   
    // check if job is successful
    assertEquals("Job not successful",
                 JobStatus.SUCCEEDED, job.getStatus().getRunState());
View Full Code Here

          4, metrics.getReservedMapSlots());
    assertEquals("reserved reduce slots do not match",
          4, metrics.getReservedReduceSlots());
   
    TaskAttemptID mTid = fjob.findMapTask(trackers[1]);
    TaskAttemptID rTid = fjob.findReduceTask(trackers[1]);

    fjob.finishTask(mTid);
    fjob.finishTask(rTid);
   
    assertEquals("Job didnt complete successfully complete", fjob.getStatus()
View Full Code Here

     * task failures. So working around it by failing
     * reduce and blacklisting tracker.
     * Then finish the map task later.
     */
    TaskAttemptID mTid = job.findMapTask(trackers[0]);
    TaskAttemptID rTid = job.findReduceTask(trackers[0]);
    //Task should blacklist the tasktracker.
    job.failTask(rTid);
   
    assertEquals("Tracker 0 not blacklisted for the job", 1,
        job.getBlackListedTrackers().size());
View Full Code Here

    //Finish the map task on the tracker 1. Finishing it here to work
    //around bug in the FakeJobInProgress object
    job.finishTask(mTid);
    mTid = job.findMapTask(trackers[1]);
    rTid = job.findReduceTask(trackers[1]);
    job.finishTask(mTid);
    job.finishTask(rTid);
    rTid = job.findReduceTask(trackers[1]);
    job.finishTask(rTid);
    assertEquals("Job didnt complete successfully complete", job.getStatus()
View Full Code Here

    job.finishTask(mTid);
    mTid = job.findMapTask(trackers[1]);
    rTid = job.findReduceTask(trackers[1]);
    job.finishTask(mTid);
    job.finishTask(rTid);
    rTid = job.findReduceTask(trackers[1]);
    job.finishTask(rTid);
    assertEquals("Job didnt complete successfully complete", job.getStatus()
        .getRunState(), JobStatus.SUCCEEDED);
    assertEquals("Trackers not unreserved for the job : maps",
        0, job.getNumReservedTaskTrackersForMaps());
View Full Code Here

    conf.setNumReduceTasks(5);
    conf.setFloat(JobContext.SPECULATIVE_SLOWTASK_THRESHOLD, 0.5f);
    FakeJobInProgress job = new FakeJobInProgress(conf, jobTracker);   
    job.initTasks();
    //schedule maps
    taskAttemptID[0] = job.findReduceTask(trackers[0]);
    taskAttemptID[1] = job.findReduceTask(trackers[1]);
    taskAttemptID[2] = job.findReduceTask(trackers[2]);
    taskAttemptID[3] = job.findReduceTask(trackers[3]);
    taskAttemptID[4] = job.findReduceTask(trackers[3]);
    clock.advance(5000);
View Full Code Here

    conf.setFloat(JobContext.SPECULATIVE_SLOWTASK_THRESHOLD, 0.5f);
    FakeJobInProgress job = new FakeJobInProgress(conf, jobTracker);   
    job.initTasks();
    //schedule maps
    taskAttemptID[0] = job.findReduceTask(trackers[0]);
    taskAttemptID[1] = job.findReduceTask(trackers[1]);
    taskAttemptID[2] = job.findReduceTask(trackers[2]);
    taskAttemptID[3] = job.findReduceTask(trackers[3]);
    taskAttemptID[4] = job.findReduceTask(trackers[3]);
    clock.advance(5000);
    job.finishTask(taskAttemptID[0]);
View Full Code Here

    FakeJobInProgress job = new FakeJobInProgress(conf, jobTracker);   
    job.initTasks();
    //schedule maps
    taskAttemptID[0] = job.findReduceTask(trackers[0]);
    taskAttemptID[1] = job.findReduceTask(trackers[1]);
    taskAttemptID[2] = job.findReduceTask(trackers[2]);
    taskAttemptID[3] = job.findReduceTask(trackers[3]);
    taskAttemptID[4] = job.findReduceTask(trackers[3]);
    clock.advance(5000);
    job.finishTask(taskAttemptID[0]);
    clock.advance(1000);
View Full Code Here

    job.initTasks();
    //schedule maps
    taskAttemptID[0] = job.findReduceTask(trackers[0]);
    taskAttemptID[1] = job.findReduceTask(trackers[1]);
    taskAttemptID[2] = job.findReduceTask(trackers[2]);
    taskAttemptID[3] = job.findReduceTask(trackers[3]);
    taskAttemptID[4] = job.findReduceTask(trackers[3]);
    clock.advance(5000);
    job.finishTask(taskAttemptID[0]);
    clock.advance(1000);
    job.finishTask(taskAttemptID[1]);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.