} else { RetireJobInfo info = retireJobs.get(jobid); if (info != null) { if (info.status == null) {
/** * @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); }
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, 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); } } }
/** * 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; }