@Override public void run() { jobProgressTracker.logError(logLine); } });
@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); } }