public String getState() { return this.state.toString(); }
public String getState() { return this.state.toString(); }
public String getState() { return this.state.toString(); }
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(); }
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(); }
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(); }
userUrl = userUrl.replace(JOB_STATUS, jobReport.getJobState().toString());
userUrl = userUrl.replace(JOB_STATUS, jobReport.getJobState().toString());
userUrl = userUrl.replace(JOB_STATUS, jobReport.getJobState().toString());
this.queue = job.getQueueName(); this.user = job.getUserName(); this.state = job.getState().toString();
this.queue = job.getQueueName(); this.user = job.getUserName(); this.state = job.getState().toString();
this.queue = job.getQueueName(); this.user = job.getUserName(); this.state = job.getState().toString();
private void testNotificationOnLastRetry(boolean withRuntimeException) throws Exception { HttpServer2 server = startHttpServer(); // Act like it is the second attempt. Default max attempts is 2 MRApp app = spy(new MRAppWithCustomContainerAllocator( 2, 2, true, this.getClass().getName(), true, 2, true)); doNothing().when(app).sysexit(); JobConf conf = new JobConf(); conf.set(JobContext.MR_JOB_END_NOTIFICATION_URL, JobEndServlet.baseUrl + "jobend?jobid=$jobId&status=$jobStatus"); JobImpl job = (JobImpl)app.submit(conf); app.waitForInternalState(job, JobStateInternal.SUCCEEDED); // Unregistration succeeds: successfullyUnregistered is set if (withRuntimeException) { YarnRuntimeException runtimeException = new YarnRuntimeException( new ClosedChannelException()); doThrow(runtimeException).when(app).stop(); } app.shutDownJob(); Assert.assertTrue(app.isLastAMRetry()); Assert.assertEquals(1, JobEndServlet.calledTimes); Assert.assertEquals("jobid=" + job.getID() + "&status=SUCCEEDED", JobEndServlet.requestUri.getQuery()); Assert.assertEquals(JobState.SUCCEEDED.toString(), JobEndServlet.foundJobState); server.stop(); }
/** * This transition executes in the event-dispatcher thread, though it's * triggered in MRAppMaster's startJobs() method. */ @Override public void transition(JobImpl job, JobEvent event) { JobStartEvent jse = (JobStartEvent) event; if (jse.getRecoveredJobStartTime() != 0) { job.startTime = jse.getRecoveredJobStartTime(); } else { job.startTime = job.clock.getTime(); } JobInitedEvent jie = new JobInitedEvent(job.oldJobId, job.startTime, job.numMapTasks, job.numReduceTasks, job.getState().toString(), job.isUber()); job.eventHandler.handle(new JobHistoryEvent(job.jobId, jie)); JobInfoChangeEvent jice = new JobInfoChangeEvent(job.oldJobId, job.appSubmitTime, job.startTime); job.eventHandler.handle(new JobHistoryEvent(job.jobId, jice)); job.metrics.runningJob(job); job.eventHandler.handle(new CommitterJobSetupEvent( job.jobId, job.jobContext)); } }
/** * This transition executes in the event-dispatcher thread, though it's * triggered in MRAppMaster's startJobs() method. */ @Override public void transition(JobImpl job, JobEvent event) { JobStartEvent jse = (JobStartEvent) event; if (jse.getRecoveredJobStartTime() != -1L) { job.startTime = jse.getRecoveredJobStartTime(); } else { job.startTime = job.clock.getTime(); } JobInitedEvent jie = new JobInitedEvent(job.oldJobId, job.startTime, job.numMapTasks, job.numReduceTasks, job.getState().toString(), job.isUber()); job.eventHandler.handle(new JobHistoryEvent(job.jobId, jie)); JobInfoChangeEvent jice = new JobInfoChangeEvent(job.oldJobId, job.appSubmitTime, job.startTime); job.eventHandler.handle(new JobHistoryEvent(job.jobId, jice)); job.metrics.runningJob(job); job.eventHandler.handle(new CommitterJobSetupEvent( job.jobId, job.jobContext)); } }
/** * This transition executes in the event-dispatcher thread, though it's * triggered in MRAppMaster's startJobs() method. */ @Override public void transition(JobImpl job, JobEvent event) { JobStartEvent jse = (JobStartEvent) event; if (jse.getRecoveredJobStartTime() != -1L) { job.startTime = jse.getRecoveredJobStartTime(); } else { job.startTime = job.clock.getTime(); } JobInitedEvent jie = new JobInitedEvent(job.oldJobId, job.startTime, job.numMapTasks, job.numReduceTasks, job.getState().toString(), job.isUber()); job.eventHandler.handle(new JobHistoryEvent(job.jobId, jie)); JobInfoChangeEvent jice = new JobInfoChangeEvent(job.oldJobId, job.appSubmitTime, job.startTime); job.eventHandler.handle(new JobHistoryEvent(job.jobId, jice)); job.metrics.runningJob(job); job.eventHandler.handle(new CommitterJobSetupEvent( job.jobId, job.jobContext)); } }
public void verifyAMJobGeneric(Job job, String id, String user, String name, String state, long startTime, long finishTime, long elapsedTime, int mapsTotal, int mapsCompleted, int reducesTotal, int reducesCompleted, float reduceProgress, float mapProgress) { JobReport report = job.getReport(); WebServicesTestUtils.checkStringMatch("id", MRApps.toString(job.getID()), id); WebServicesTestUtils.checkStringMatch("user", job.getUserName().toString(), user); WebServicesTestUtils.checkStringMatch("name", job.getName(), name); WebServicesTestUtils.checkStringMatch("state", job.getState().toString(), state); assertEquals("startTime incorrect", report.getStartTime(), startTime); assertEquals("finishTime incorrect", report.getFinishTime(), finishTime); assertEquals("elapsedTime incorrect", Times.elapsed(report.getStartTime(), report.getFinishTime()), elapsedTime); assertEquals("mapsTotal incorrect", job.getTotalMaps(), mapsTotal); assertEquals("mapsCompleted incorrect", job.getCompletedMaps(), mapsCompleted); assertEquals("reducesTotal incorrect", job.getTotalReduces(), reducesTotal); assertEquals("reducesCompleted incorrect", job.getCompletedReduces(), reducesCompleted); assertEquals("mapProgress incorrect", report.getMapProgress() * 100, mapProgress, 0); assertEquals("reduceProgress incorrect", report.getReduceProgress() * 100, reduceProgress, 0); }
mi.getJobIndexInfo().setNumReduces( jFinishedEvent.getSucceededReduces()); mi.getJobIndexInfo().setJobStatus(JobState.SUCCEEDED.toString()); closeEventWriter(event.getJobID()); processDoneFiles(event.getJobID());
mi.getJobIndexInfo().setNumReduces( jFinishedEvent.getFinishedReduces()); mi.getJobIndexInfo().setJobStatus(JobState.SUCCEEDED.toString()); closeEventWriter(event.getJobID()); processDoneFiles(event.getJobID());
mi.getJobIndexInfo().setNumReduces( jFinishedEvent.getFinishedReduces()); mi.getJobIndexInfo().setJobStatus(JobState.SUCCEEDED.toString()); closeEventWriter(event.getJobID()); processDoneFiles(event.getJobID());