} else { RetireJobInfo info = retireJobs.get(jobid); if (info != null) { if (info.status == null) {
tracker.retireJobs.getAll().descendingIterator(); if (!iterator.hasNext()) { sb.append("<tr><th align=\"center\" colspan=\"8\"><i>none</i>" +
public JobStatus[] getAllJobs() { List<JobStatus> list = new ArrayList<JobStatus>(); list.addAll(Arrays.asList(getJobStatus(jobs.values(),false))); list.addAll(retireJobs.getAllJobStatus()); return list.toArray(new JobStatus[list.size()]); }
if (minConditionToRetire(job, now) && (RETIRE_COMPLETED_JOBS || (job.getFinishTime() < retireBefore))) { retiredJobs.add(job); jobUser.getJobID()); it.remove(); } else if (minConditionToRetire(jobUser, now)) { LOG.info("User limit exceeded. Marking job: " + jobUser.getJobID() + " for retire."); jobUser + "'"); toBeDeleted.add(job.getProfile().getJobID()); addToCache(job);
tracker.retireJobs.getAll().descendingIterator(); if (!iterator.hasNext()) { sb.append("<tr><td align=\"center\" colspan=\"8\"><i>none</i>" +
retireJobs.addToCache(job.getStatus());
tracker.retireJobs.getAll().descendingIterator();
tracker.retireJobs.getAll().descendingIterator();
/** * @deprecated Use * {@link #getJobStatus(org.apache.hadoop.mapreduce.JobID)} instead */ @Deprecated public JobStatus getJobStatus(JobID jobid) { if (null == jobid) { LOG.warn("JobTracker.getJobStatus() cannot get status for null jobid"); return null; } synchronized (this) { JobInProgress job = jobs.get(jobid); if (job != null) { // Safe to call JobInProgress.getStatus while holding the lock // on the JobTracker since it isn't a synchronized method return job.getStatus(); } else { JobStatus status = retireJobs.get(jobid); if (status != null) { return status; } } } return completedJobStatusStore.readJobStatus(jobid); }
/** * Given jobId, taskid resolve the link to taskdetailshistory.jsp * @param tracker JobTracker * @param jobId JobID * @param tid String * @return the link to the page jobdetailshistory.jsp for the job */ public static String getTaskDetailsHistoryLink(JobTracker tracker, String jobId, String tid) { RetireJobInfo info = tracker.retireJobs.get(JobID.forName(jobId)); String historyFileUrl = getHistoryFileUrl(info); String result = (historyFileUrl == null ? "" : "taskdetailshistory.jsp?jobid=" + jobId + "&logFile=" + historyFileUrl + "&taskid=" + tid); return result; }
@Override public synchronized void historyFileCopied(JobID jobid, String historyFile) { JobInProgress job = getJob(jobid); if (job != null) { //found in main cache job.setHistoryFileCopied(); if (historyFile != null) { job.setHistoryFile(historyFile); } return; } RetireJobInfo jobInfo = retireJobs.get(jobid); if (jobInfo != null) { //found in retired cache if (historyFile != null) { jobInfo.setHistoryFile(historyFile); } } }
public JobProfile getJobProfile(JobID jobid) { synchronized (this) { JobInProgress job = jobs.get(jobid); if (job != null) { // Safe to call JobInProgress.getProfile while holding the lock // on the JobTracker since it isn't a synchronized method return job.getProfile(); } else { RetireJobInfo info = retireJobs.get(jobid); if (info != null) { return info.profile; } } } return completedJobStatusStore.readJobProfile(jobid); } public JobStatus getJobStatus(JobID jobid) {
/** * Given jobId, resolve the link to jobdetailshistory.jsp * @param tracker JobTracker * @param jobId JobID * @return the link to the page jobdetailshistory.jsp for the job */ public static String getJobDetailsHistoryLink(JobTracker tracker, String jobId) { RetireJobInfo info = tracker.retireJobs.get(JobID.forName(jobId)); String historyFileUrl = getHistoryFileUrl(info); String result = (historyFileUrl == null ? "" : "jobdetailshistory.jsp?jobid=" + jobId + "&logFile=" + historyFileUrl); return result; }
/** * @see org.apache.hadoop.mapreduce.protocol.ClientProtocol#getSystemDir() */ public org.apache.hadoop.mapreduce.JobStatus[] getAllJobs() { List<JobStatus> list = new ArrayList<JobStatus>(); list.addAll(Arrays.asList(getJobStatus(jobs.values(),false))); list.addAll(retireJobs.getAll()); return list.toArray(new JobStatus[list.size()]); }