@Override public void run() { jobProgressTracker.logError(logLine); } });
@Override public void run() { jobProgressTracker.logFailure(reason); } });
@Override public void run() { jobProgressTracker.logInfo(logLine); } });
@Override public void run() { jobProgressTracker.updateProgress(workerProgress); } });
@Override public void run() { jobProgressTracker.mapperStarted(); } });
/** * Update worker progress and send it */ private void updateAndSendProgress() { WorkerProgress.get().updateMemory(); jobProgressTracker.updateProgress(WorkerProgress.get()); }
/** * Call this to log a line to command line of the job. Use in moderation - * it's a synchronous call to Job client * * @param line Line to print */ public final void logToCommandLine(String line) { serviceWorker.getJobProgressTracker().logInfo(line); }
@Override public void run(Context context) throws IOException, InterruptedException { // Notify the master quicker if there is worker failure rather than // waiting for ZooKeeper to timeout and delete the ephemeral znodes try { setup(context); while (context.nextKeyValue()) { graphTaskManager.execute(); } cleanup(context); // Checkstyle exception due to needing to dump ZooKeeper failure // on exception // CHECKSTYLE: stop IllegalCatch } catch (RuntimeException e) { // CHECKSTYLE: resume IllegalCatch LOG.error("Caught an unrecoverable exception " + e.getMessage(), e); graphTaskManager.getJobProgressTracker().logError( "Exception occurred on mapper " + graphTaskManager.getConf().getTaskPartition() + ": " + ExceptionUtils.getStackTrace(e)); graphTaskManager.zooKeeperCleanup(); graphTaskManager.workerFailureCleanup(); throw new IllegalStateException( "run: Caught an unrecoverable exception " + e.getMessage(), e); } }
/** * Set the job state to FAILED. This will kill the job, and log exceptions to * any observers. * * @param reason The reason the job failed */ private void setJobStateFailed(String reason) { getGraphTaskManager().getJobProgressTracker().logFailure(reason); setJobState(ApplicationState.FAILED, -1, -1, false); failJob(new IllegalStateException(reason)); }
/** * Call this to log a line to command line of the job. Use in moderation - * it's a synchronous call to Job client * * @param line Line to print */ public void logToCommandLine(String line) { serviceMaster.getJobProgressTracker().logInfo(line); }
" on superstep " + getSuperstep()); getGraphTaskManager().getJobProgressTracker().logInfo(errorMessage);