/** * A version of JobID.forName with our app specific error handling. */ public static JobID StringToJobID(String id) throws BadParam { try { return JobID.forName(id); } catch (IllegalArgumentException e) { throw new BadParam(e.getMessage()); } } }
private RunningJob getRunningJob(MapReduceJob job, JobClient jobClient) throws Exception { RunningJob runningJob = jobClient.getJob(JobID.forName(job.getId())); if (runningJob == null) { throw new Exception(String.format("Failed to retrieve job with id '%s'", job.getId())); } return runningJob; }
private void init(String jobIDStr) { try { jobId = JobID.forName(jobIDStr); rj = jobClient.getJob(jobId); nodeId = AmbroseHiveUtil.getNodeIdFromJob(SessionState.get().getConf(), rj); } catch (IOException e) { LOG.error("Error getting running job for id : " + jobIDStr, e); } }
private void logJob(String logDir, String jobID, PrintWriter listWriter) throws IOException { RunningJob rj = jobClient.getJob(JobID.forName(jobID)); String jobURLString = rj.getTrackingURL();
org.apache.hadoop.mapred.JobID.forName(childJobIdString); LOG.info(String.format("Reconnecting to an existing job %s", childJobIdString));
private static JobStatus createTestJobStatus(String jobId, int state) { return new JobStatus( JobID.forName(jobId), 0.5f, 0.0f, state, "root", "TestJobEndNotifier", null, null); }
/** * Set the mapred ID for this job. * @param mapredJobID the mapred job ID for this job. * @deprecated use {@link #setAssignedJobID(JobID)} instead */ @Deprecated public void setMapredJobID(String mapredJobID) { this.mapredJobID = JobID.forName(mapredJobID); }
/** * @deprecated use JobProfile(String, JobID, String, String, String) instead */ @Deprecated public JobProfile(String user, String jobid, String jobFile, String url, String name) { this(user, JobID.forName(jobid), jobFile, url, name); }
/** * @deprecated use JobProfile(String, JobID, String, String, String) instead */ @Deprecated public JobProfile(String user, String jobid, String jobFile, String url, String name) { this(user, JobID.forName(jobid), jobFile, url, name); }
/** * Set the mapred ID for this job. * @param mapredJobID the mapred job ID for this job. * @deprecated use {@link #setAssignedJobID(JobID)} instead */ @Deprecated public void setMapredJobID(String mapredJobID) { this.mapredJobID = JobID.forName(mapredJobID); }
private boolean isHadoopJobId(final String jobIdCandidate) { try { return JobID.forName(jobIdCandidate) != null; } catch (final IllegalArgumentException e) { LOG.warn("Job ID candidate is not a Hadoop Job ID.", e); return false; } } }
/**@deprecated Applications should rather use {@link #getReduceTaskReports(JobID)}*/ @Deprecated public TaskReport[] getReduceTaskReports(String jobId) throws IOException { return getReduceTaskReports(JobID.forName(jobId)); }
/**@deprecated Applications should rather use {@link #getJob(JobID)}. */ @Deprecated public RunningJob getJob(String jobid) throws IOException { return getJob(JobID.forName(jobid)); }
/**@deprecated Applications should rather use {@link #getJob(JobID)}. */ @Deprecated public RunningJob getJob(String jobid) throws IOException { return getJob(JobID.forName(jobid)); }
/** * This is no-op method for backward compatibility. It's a behavior change * from 1.x, we can not change job ids from job. * * @param mapredJobID * the mapred job ID for this job. */ @Deprecated public synchronized void setMapredJobID(String mapredJobID) { setAssignedJobID(JobID.forName(mapredJobID)); } }
/** * A version of JobID.forName with our app specific error handling. */ public static JobID StringToJobID(String id) throws BadParam { try { return JobID.forName(id); } catch (IllegalArgumentException e) { throw new BadParam(e.getMessage()); } } }
/** * This is no-op method for backward compatibility. It's a behavior change * from 1.x, we can not change job ids from job. * * @param mapredJobID * the mapred job ID for this job. */ @Deprecated public synchronized void setMapredJobID(String mapredJobID) { setAssignedJobID(JobID.forName(mapredJobID)); } }
/**@deprecated Applications should rather use {@link #getMapTaskReports(JobID)}*/ @Deprecated public TaskReport[] getMapTaskReports(String jobId) throws IOException { return getMapTaskReports(JobID.forName(jobId)); }
private boolean isHadoopJobId(final String jobIdCandidate) { try { return JobID.forName(jobIdCandidate) != null; } catch (final IllegalArgumentException e) { LOG.warn("Job ID candidate is not a Hadoop Job ID.", e); return false; } } }
private String getBaseLocation(String jobId, String user) { final JobID jobID = JobID.forName(jobId); final ApplicationId appID = ApplicationId.newInstance(Long.parseLong(jobID.getJtIdentifier()), jobID.getId()); final String baseStr = ContainerLocalizer.USERCACHE + "/" + user + "/" + ContainerLocalizer.APPCACHE + "/" + appID.toString() + "/output" + "/"; return baseStr; }