protected JobStateInternal checkReadyForCommit() { JobStateInternal currentState = getInternalState(); if (completedTaskCount == tasks.size() && currentState == JobStateInternal.RUNNING) { eventHandler.handle(new CommitterJobCommitEvent(jobId, getJobContext())); return JobStateInternal.COMMITTING; } // return the current state as job not ready to commit yet return getInternalState(); }
try { commitJobIsRepeatable = committer.isCommitJobRepeatable( event.getJobContext()); } catch (IOException e) { LOG.warn("Exception in committer.isCommitJobRepeatable():", e); jobCommitStarted(); waitForValidCommitWindow(); committer.commitJob(event.getJobContext()); touchz(endCommitSuccessFile, commitJobIsRepeatable); context.getEventHandler().handle( new JobCommitCompletedEvent(event.getJobID())); } catch (Exception e) { LOG.error("Could not commit job", e); new JobCommitFailedEvent(event.getJobID(), StringUtils.stringifyException(e))); } finally {
try { commitJobIsRepeatable = committer.isCommitJobRepeatable( event.getJobContext()); } catch (IOException e) { LOG.warn("Exception in committer.isCommitJobRepeatable():", e); jobCommitStarted(); waitForValidCommitWindow(); committer.commitJob(event.getJobContext()); touchz(endCommitSuccessFile, commitJobIsRepeatable); context.getEventHandler().handle( new JobCommitCompletedEvent(event.getJobID())); } catch (Exception e) { LOG.error("Could not commit job", e); new JobCommitFailedEvent(event.getJobID(), StringUtils.stringifyException(e))); } finally {
protected JobStateInternal checkReadyForCommit() { JobStateInternal currentState = getInternalState(); if (completedTaskCount == tasks.size() && currentState == JobStateInternal.RUNNING) { eventHandler.handle(new CommitterJobCommitEvent(jobId, getJobContext())); return JobStateInternal.COMMITTING; } // return the current state as job not ready to commit yet return getInternalState(); }
try { commitJobIsRepeatable = committer.isCommitJobRepeatable( event.getJobContext()); } catch (IOException e) { LOG.warn("Exception in committer.isCommitJobRepeatable():", e); jobCommitStarted(); waitForValidCommitWindow(); committer.commitJob(event.getJobContext()); touchz(endCommitSuccessFile, commitJobIsRepeatable); context.getEventHandler().handle( new JobCommitCompletedEvent(event.getJobID())); } catch (Exception e) { LOG.error("Could not commit job", e); new JobCommitFailedEvent(event.getJobID(), StringUtils.stringifyException(e))); } finally {
protected JobStateInternal checkReadyForCommit() { JobStateInternal currentState = getInternalState(); if (completedTaskCount == tasks.size() && currentState == JobStateInternal.RUNNING) { eventHandler.handle(new CommitterJobCommitEvent(jobId, getJobContext())); return JobStateInternal.COMMITTING; } // return the current state as job not ready to commit yet return getInternalState(); }
handler.start(); try { handler.handle(new CommitterJobCommitEvent(jobId, mockJobContext));
handler.start(); try { handler.handle(new CommitterJobCommitEvent(jobId, mockJobContext));
ceh.handle(new CommitterJobCommitEvent(null, null)); long timeToWaitMs = 5000; while (rmhh.getNumCallbacks() != 1 && timeToWaitMs > 0) { ceh.handle(new CommitterJobCommitEvent(null, null)); timeToWaitMs = 5000; while (jeh.numCommitCompletedEvents != 2 && timeToWaitMs > 0) {