/** * Returns specified TaskInProgress, or null. */ public TaskInProgress getTip(TaskID tipid) { JobInProgress job = jobs.get(tipid.getJobID()); return (job == null ? null : job.getTaskInProgress(tipid)); }
/** * Returns specified TaskInProgress, or null. */ public TaskInProgress getTip(TaskID tipid) { JobInProgress job = jobs.get(tipid.getJobID()); return (job == null ? null : job.getTaskInProgress(tipid)); }
/** * Get the diagnostics for a given task * @param taskId the id of the task * @return an array of the diagnostic messages */ public synchronized String[] getTaskDiagnostics(TaskAttemptID taskId) throws IOException { JobID jobId = taskId.getJobID(); TaskID tipId = taskId.getTaskID(); JobInProgress job = jobs.get(jobId); if (job == null) { throw new IllegalArgumentException("Job " + jobId + " not found."); } TaskInProgress tip = job.getTaskInProgress(tipId); if (tip == null) { throw new IllegalArgumentException("TIP " + tipId + " not found."); } List<String> taskDiagnosticInfo = tip.getDiagnosticInfo(taskId); return ((taskDiagnosticInfo == null) ? null : taskDiagnosticInfo.toArray(new String[0])); }
/** * Get the diagnostics for a given task * @param taskId the id of the task * @return an array of the diagnostic messages */ @Deprecated public synchronized String[] getTaskDiagnostics(TaskAttemptID taskId) throws IOException { List<String> taskDiagnosticInfo = null; JobID jobId = taskId.getJobID(); TaskID tipId = taskId.getTaskID(); JobInProgress job = jobs.get(jobId); if (job != null) { // check the access to the job. aclsManager.checkAccess(job, UserGroupInformation.getCurrentUser(), Operation.VIEW_JOB_DETAILS); if (isJobInited(job)) { TaskInProgress tip = job.getTaskInProgress(tipId); if (tip != null) { taskDiagnosticInfo = tip.getDiagnosticInfo(taskId); } } } return ((taskDiagnosticInfo == null) ? EMPTY_TASK_DIAGNOSTICS : taskDiagnosticInfo.toArray(new String[taskDiagnosticInfo.size()])); }
TaskInProgress tip = jip.getTaskInProgress(tr.getTaskID());
TaskID id = attemptId.getTaskID(); String type = attempt.get(Keys.TASK_TYPE); TaskInProgress tip = job.getTaskInProgress(id);
job.getTaskInProgress(taskid.getTaskID())); } else {
String type = attempt.get(Keys.TASK_TYPE); TaskInProgress tip = job.getTaskInProgress(taskId); long attemptFinishTime = attempt.getLong(Keys.FINISH_TIME);
private void addUnsuccessfulAttempt(JobInProgress job, TaskAttemptID attemptId, JobHistory.TaskAttempt attempt) { // I. Get the required info TaskID taskId = attemptId.getTaskID(); TaskInProgress tip = job.getTaskInProgress(taskId); long attemptFinishTime = attempt.getLong(Keys.FINISH_TIME); TaskStatus taskStatus = (TaskStatus)tip.getTaskStatus(attemptId).clone(); taskStatus.setFinishTime(attemptFinishTime); // Reset the progress taskStatus.setProgress(0.0f); String stateString = attempt.get(Keys.STATE_STRING); taskStatus.setStateString(stateString); boolean hasFailed = attempt.get(Keys.TASK_STATUS).equals(Values.FAILED.name()); // Set the state failed/killed if (hasFailed) { taskStatus.setRunState(TaskStatus.State.FAILED); } else { taskStatus.setRunState(TaskStatus.State.KILLED); } // Get/Set the error msg String diagInfo = attempt.get(Keys.ERROR); taskStatus.setDiagnosticInfo(diagInfo); // diag info // II. Update the task status job.updateTaskStatus(tip, taskStatus, myInstrumentation); // III. Prevent the task from expiry expireLaunchingTasks.removeTask(attemptId); }
JobInProgress job = getJob(taskId.getJobID()); if (tip == null) { tip = job.getTaskInProgress(taskId.getTaskID()); job.addRunningTaskToTIP(tip, taskId, status, false);
TaskID tid = attemptId.getTaskID(); TaskInProgress tip = jip.getTaskInProgress (org.apache.hadoop.mapred.TaskID.downgrade(tid));
tid.equals(setupTaskId)) { TaskInProgress tip = jip.getTaskInProgress (org.apache.hadoop.mapred.TaskID.downgrade(tid)); assertTrue("START_TIME of Task " + tid + " obtained from history " +
TaskInProgress tip = job.getTaskInProgress(tipidObj); TaskStatus[] ts = null; boolean isCleanupOrSetup = false;