Exemple #1
0
 /** Get the events list at the tasktracker */
 public MapTaskCompletionEventsUpdate getMapTaskCompletionEventsUpdates(
     int index, JobID jobId, int max) throws IOException {
   String jtId = jobTracker.getJobTracker().getTrackerIdentifier();
   TaskAttemptID dummy = new TaskAttemptID(jtId, jobId.getId(), false, 0, 0);
   return taskTrackerList
       .get(index)
       .getTaskTracker()
       .getMapCompletionEvents(jobId, 0, max, dummy, null);
 }
Exemple #2
0
  void startJobTracker(boolean wait) {
    //  Create the JobTracker
    jobTracker = new JobTrackerRunner(conf);
    jobTrackerThread = new Thread(jobTracker);

    jobTrackerThread.start();

    if (!wait) {
      return;
    }

    while (jobTracker.isActive() && !jobTracker.isUp()) {
      try { // let daemons get started
        Thread.sleep(1000);
      } catch (InterruptedException e) {
      }
    }

    // is the jobtracker has started then wait for it to init
    ClusterStatus status = null;
    if (jobTracker.isUp()) {
      status = jobTracker.getJobTracker().getClusterStatus(false);
      while (jobTracker.isActive()
          && status.getJobTrackerState() == JobTracker.State.INITIALIZING) {
        try {
          LOG.info("JobTracker still initializing. Waiting.");
          Thread.sleep(1000);
        } catch (InterruptedException e) {
        }
        status = jobTracker.getJobTracker().getClusterStatus(false);
      }
    }

    if (!jobTracker.isActive()) {
      // return if jobtracker has crashed
      return;
    }

    // Set the configuration for the task-trackers
    this.jobTrackerPort = jobTracker.getJobTrackerPort();
    this.jobTrackerInfoPort = jobTracker.getJobTrackerInfoPort();
  }
Exemple #3
0
 public int getFaultCount(String hostName) {
   return jobTracker.getJobTracker().getFaultCount(hostName);
 }
Exemple #4
0
 /** Get num events recovered */
 public int getNumEventsRecovered() {
   return jobTracker.getJobTracker().recoveryManager.totalEventsRecovered();
 }
Exemple #5
0
 /** Init the job */
 public void initializeJob(JobID jobId) throws IOException {
   JobInProgress job = jobTracker.getJobTracker().getJob(jobId);
   jobTracker.getJobTracker().initJob(job);
 }
Exemple #6
0
 /** Get the job finish time */
 public long getJobFinishTime(JobID jobId) {
   return jobTracker.getJobTracker().getJob(jobId).getFinishTime();
 }
Exemple #7
0
 /** Get the job's priority */
 public JobPriority getJobPriority(JobID jobId) {
   return jobTracker.getJobTracker().getJob(jobId).getPriority();
 }
Exemple #8
0
 /**
  * Change the job's priority
  *
  * @throws IOException
  * @throws AccessControlException
  */
 public void setJobPriority(JobID jobId, JobPriority priority)
     throws AccessControlException, IOException {
   jobTracker.getJobTracker().setJobPriority(jobId, priority);
 }
Exemple #9
0
 /** Get the task completion events */
 public TaskCompletionEvent[] getTaskCompletionEvents(JobID id, int from, int max)
     throws IOException {
   return jobTracker.getJobTracker().getTaskCompletionEvents(id, from, max);
 }