@Override public JobState getState() { JobState js = null; try { js = JobState.valueOf(jobIndexInfo.getJobStatus()); } catch (Exception e) { // Meant for use by the display UI. Exception would prevent it from being // rendered.e Defaulting to KILLED LOG.warn("Exception while parsing job state. Defaulting to KILLED", e); js = JobState.KILLED; } return js; }
public String getState() { return this.state.toString(); }
public static JobStateProto convertToProtoFormat(JobState e) { return JobStateProto.valueOf(JOB_STATE_PREFIX + e.name()); } public static JobState convertFromProtoFormat(JobStateProto e) {
/** * Runs memory and time benchmark with Mock MRApp. * @param app Application to submit * @throws Exception On application failure */ public void run(MRApp app) throws Exception { GenericTestUtils.setRootLogLevel(Level.WARN); long startTime = System.currentTimeMillis(); Job job = app.submit(new Configuration()); while (!job.getReport().getJobState().equals(JobState.SUCCEEDED)) { printStat(job, startTime); Thread.sleep(2000); } printStat(job, startTime); }
public void waitForState(Job job, JobState finalState) throws Exception { int timeoutSecs = 0; JobReport report = job.getReport(); while (!finalState.equals(report.getJobState()) && timeoutSecs++ < 20) { System.out.println("Job State is : " + report.getJobState() + " Waiting for state : " + finalState + " map progress : " + report.getMapProgress() + " reduce progress : " + report.getReduceProgress()); report = job.getReport(); Thread.sleep(500); } System.out.println("Job State is : " + report.getJobState()); Assert.assertEquals("Job state is not correct (timedout)", finalState, job.getState()); }
@Override public JobState getState() { JobState js = null; try { js = JobState.valueOf(jobIndexInfo.getJobStatus()); } catch (Exception e) { // Meant for use by the display UI. Exception would prevent it from being // rendered.e Defaulting to KILLED LOG.warn("Exception while parsing job state. Defaulting to KILLED", e); js = JobState.KILLED; } return js; }
public String getState() { return this.state.toString(); }
public static JobStateProto convertToProtoFormat(JobState e) { return JobStateProto.valueOf(JOB_STATE_PREFIX + e.name()); } public static JobState convertFromProtoFormat(JobStateProto e) {
public static JobState convertFromProtoFormat(JobStateProto e) { return JobState.valueOf(e.name().replace(JOB_STATE_PREFIX, "")); }
public String getState() { return this.state.toString(); }
public static JobStateProto convertToProtoFormat(JobState e) { return JobStateProto.valueOf(JOB_STATE_PREFIX + e.name()); } public static JobState convertFromProtoFormat(JobStateProto e) {
@Override public JobState getState() { return JobState.valueOf(jobInfo.getJobStatus()); }
private String createJobStateForJobUnsuccessfulCompletionEvent( String forcedJobStateOnShutDown) { if (forcedJobStateOnShutDown == null || forcedJobStateOnShutDown .isEmpty()) { return JobState.KILLED.toString(); } else if (forcedJobStateOnShutDown.equals( JobStateInternal.ERROR.toString()) || forcedJobStateOnShutDown.equals(JobStateInternal.FAILED.toString())) { return JobState.FAILED.toString(); } else if (forcedJobStateOnShutDown.equals(JobStateInternal.SUCCEEDED .toString())) { return JobState.SUCCEEDED.toString(); } return JobState.KILLED.toString(); }
public static JobStateProto convertToProtoFormat(JobState e) { return JobStateProto.valueOf(JOB_STATE_PREFIX + e.name()); } public static JobState convertFromProtoFormat(JobStateProto e) {
@Override public JobState getState() { return JobState.valueOf(jobInfo.getJobStatus()); }
private String createJobStateForJobUnsuccessfulCompletionEvent( String forcedJobStateOnShutDown) { if (forcedJobStateOnShutDown == null || forcedJobStateOnShutDown .isEmpty()) { return JobState.KILLED.toString(); } else if (forcedJobStateOnShutDown.equals( JobStateInternal.ERROR.toString()) || forcedJobStateOnShutDown.equals(JobStateInternal.FAILED.toString())) { return JobState.FAILED.toString(); } else if (forcedJobStateOnShutDown.equals(JobStateInternal.SUCCEEDED .toString())) { return JobState.SUCCEEDED.toString(); } return JobState.KILLED.toString(); }
@Override public JobState getState() { return JobState.valueOf(jobInfo.getJobStatus()); }
private String createJobStateForJobUnsuccessfulCompletionEvent( String forcedJobStateOnShutDown) { if (forcedJobStateOnShutDown == null || forcedJobStateOnShutDown .isEmpty()) { return JobState.KILLED.toString(); } else if (forcedJobStateOnShutDown.equals( JobStateInternal.ERROR.toString()) || forcedJobStateOnShutDown.equals(JobStateInternal.FAILED.toString())) { return JobState.FAILED.toString(); } else if (forcedJobStateOnShutDown.equals(JobStateInternal.SUCCEEDED .toString())) { return JobState.SUCCEEDED.toString(); } return JobState.KILLED.toString(); }
@Override public JobState getState() { JobState js = null; try { js = JobState.valueOf(jobIndexInfo.getJobStatus()); } catch (Exception e) { // Meant for use by the display UI. Exception would prevent it from being // rendered.e Defaulting to KILLED LOG.warn("Exception while parsing job state. Defaulting to KILLED", e); js = JobState.KILLED; } return js; }
userUrl = userUrl.replace(JOB_STATUS, jobReport.getJobState().toString());