/** 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); }
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(); }
public int getFaultCount(String hostName) { return jobTracker.getJobTracker().getFaultCount(hostName); }
/** Get num events recovered */ public int getNumEventsRecovered() { return jobTracker.getJobTracker().recoveryManager.totalEventsRecovered(); }
/** Init the job */ public void initializeJob(JobID jobId) throws IOException { JobInProgress job = jobTracker.getJobTracker().getJob(jobId); jobTracker.getJobTracker().initJob(job); }
/** Get the job finish time */ public long getJobFinishTime(JobID jobId) { return jobTracker.getJobTracker().getJob(jobId).getFinishTime(); }
/** Get the job's priority */ public JobPriority getJobPriority(JobID jobId) { return jobTracker.getJobTracker().getJob(jobId).getPriority(); }
/** * Change the job's priority * * @throws IOException * @throws AccessControlException */ public void setJobPriority(JobID jobId, JobPriority priority) throws AccessControlException, IOException { jobTracker.getJobTracker().setJobPriority(jobId, priority); }
/** Get the task completion events */ public TaskCompletionEvent[] getTaskCompletionEvents(JobID id, int from, int max) throws IOException { return jobTracker.getJobTracker().getTaskCompletionEvents(id, from, max); }