/** * Method to discard the committer call-backs for a specified TaskAttemptID. * @param context The TaskAttemptContext instance for the task-attempt, identifying the output. * @throws java.io.IOException On failure. */ public synchronized void discardCleanupFor(TaskAttemptContext context) throws IOException { String key = generateKey(context); LOG.info("Discarding all cleanup for TaskAttemptID:" + key); if (!taskCommitters.containsKey(key)) { LOG.warn("No committer registered for TaskAttemptID:" + key); } else { taskCommitters.remove(key); } }
/** * Method to register call-backs to control commits and aborts of TaskAttempts. * @param context The TaskAttemptContext instance for the task-attempt, identifying the output. * @param committer Instance of TaskCommitterProxy, to commit/abort a TaskAttempt. * @throws java.io.IOException On failure. */ public synchronized void register(TaskAttemptContext context, TaskCommitterProxy committer) throws IOException { String key = generateKey(context); LOG.info("Registering committer for TaskAttemptID:" + key); if (taskCommitters.containsKey(key)) { LOG.warn("Replacing previous committer:" + committer); } taskCommitters.put(key, committer); }
/** * Trigger commit for TaskAttempt, as specified by the TaskAttemptContext argument. */ public synchronized void commitTask(TaskAttemptContext context) throws IOException { String key = generateKey(context); if (!taskCommitters.containsKey(key)) { LOG.warn("No callback registered for TaskAttemptID:" + key + ". Skipping."); return; } try { LOG.info("Committing TaskAttempt:" + key); taskCommitters.get(key).commitTask(context); } catch (Throwable t) { throw new IOException("Could not clean up TaskAttemptID:" + key, t); } }
/** * Trigger abort for TaskAttempt, as specified by the TaskAttemptContext argument. */ public synchronized void abortTask(TaskAttemptContext context) throws IOException { String key = generateKey(context); if (!taskCommitters.containsKey(key)) { LOG.warn("No callback registered for TaskAttemptID:" + key + ". Skipping."); return; } try { LOG.info("Aborting TaskAttempt:" + key); taskCommitters.get(key).abortTask(context); } catch (Throwable t) { throw new IOException("Could not clean up TaskAttemptID:" + key, t); } }
/** * Method to register call-backs to control commits and aborts of TaskAttempts. * @param context The TaskAttemptContext instance for the task-attempt, identifying the output. * @param committer Instance of TaskCommitterProxy, to commit/abort a TaskAttempt. * @throws java.io.IOException On failure. */ public synchronized void register(TaskAttemptContext context, TaskCommitterProxy committer) throws IOException { String key = generateKey(context); LOG.info("Registering committer for TaskAttemptID:" + key); if (taskCommitters.containsKey(key)) { LOG.warn("Replacing previous committer:" + committer); } taskCommitters.put(key, committer); }
/** * Method to register call-backs to control commits and aborts of TaskAttempts. * @param context The TaskAttemptContext instance for the task-attempt, identifying the output. * @param committer Instance of TaskCommitterProxy, to commit/abort a TaskAttempt. * @throws java.io.IOException On failure. */ public synchronized void register(TaskAttemptContext context, TaskCommitterProxy committer) throws IOException { String key = generateKey(context); LOG.info("Registering committer for TaskAttemptID:" + key); if (taskCommitters.containsKey(key)) { LOG.warn("Replacing previous committer:" + committer); } taskCommitters.put(key, committer); }
/** * Method to register call-backs to control commits and aborts of TaskAttempts. * @param context The TaskAttemptContext instance for the task-attempt, identifying the output. * @param committer Instance of TaskCommitterProxy, to commit/abort a TaskAttempt. * @throws java.io.IOException On failure. */ public synchronized void register(TaskAttemptContext context, TaskCommitterProxy committer) throws IOException { String key = generateKey(context); LOG.info("Registering committer for TaskAttemptID:" + key); if (taskCommitters.containsKey(key)) { LOG.warn("Replacing previous committer:" + committer); } taskCommitters.put(key, committer); }
/** * Method to discard the committer call-backs for a specified TaskAttemptID. * @param context The TaskAttemptContext instance for the task-attempt, identifying the output. * @throws java.io.IOException On failure. */ public synchronized void discardCleanupFor(TaskAttemptContext context) throws IOException { String key = generateKey(context); LOG.info("Discarding all cleanup for TaskAttemptID:" + key); if (!taskCommitters.containsKey(key)) { LOG.warn("No committer registered for TaskAttemptID:" + key); } else { taskCommitters.remove(key); } }
/** * Method to discard the committer call-backs for a specified TaskAttemptID. * @param context The TaskAttemptContext instance for the task-attempt, identifying the output. * @throws java.io.IOException On failure. */ public synchronized void discardCleanupFor(TaskAttemptContext context) throws IOException { String key = generateKey(context); LOG.info("Discarding all cleanup for TaskAttemptID:" + key); if (!taskCommitters.containsKey(key)) { LOG.warn("No committer registered for TaskAttemptID:" + key); } else { taskCommitters.remove(key); } }
/** * Method to discard the committer call-backs for a specified TaskAttemptID. * @param context The TaskAttemptContext instance for the task-attempt, identifying the output. * @throws java.io.IOException On failure. */ public synchronized void discardCleanupFor(TaskAttemptContext context) throws IOException { String key = generateKey(context); LOG.info("Discarding all cleanup for TaskAttemptID:" + key); if (!taskCommitters.containsKey(key)) { LOG.warn("No committer registered for TaskAttemptID:" + key); } else { taskCommitters.remove(key); } }
/** * Trigger commit for TaskAttempt, as specified by the TaskAttemptContext argument. */ public synchronized void commitTask(TaskAttemptContext context) throws IOException { String key = generateKey(context); if (!taskCommitters.containsKey(key)) { LOG.warn("No callback registered for TaskAttemptID:" + key + ". Skipping."); return; } try { LOG.info("Committing TaskAttempt:" + key); taskCommitters.get(key).commitTask(context); } catch (Throwable t) { throw new IOException("Could not clean up TaskAttemptID:" + key, t); } }
/** * Trigger commit for TaskAttempt, as specified by the TaskAttemptContext argument. */ public synchronized void commitTask(TaskAttemptContext context) throws IOException { String key = generateKey(context); if (!taskCommitters.containsKey(key)) { LOG.warn("No callback registered for TaskAttemptID:" + key + ". Skipping."); return; } try { LOG.info("Committing TaskAttempt:" + key); taskCommitters.get(key).commitTask(context); } catch (Throwable t) { throw new IOException("Could not clean up TaskAttemptID:" + key, t); } }
/** * Trigger abort for TaskAttempt, as specified by the TaskAttemptContext argument. */ public synchronized void abortTask(TaskAttemptContext context) throws IOException { String key = generateKey(context); if (!taskCommitters.containsKey(key)) { LOG.warn("No callback registered for TaskAttemptID:" + key + ". Skipping."); return; } try { LOG.info("Aborting TaskAttempt:" + key); taskCommitters.get(key).abortTask(context); } catch (Throwable t) { throw new IOException("Could not clean up TaskAttemptID:" + key, t); } }
/** * Trigger commit for TaskAttempt, as specified by the TaskAttemptContext argument. */ public synchronized void commitTask(TaskAttemptContext context) throws IOException { String key = generateKey(context); if (!taskCommitters.containsKey(key)) { LOG.warn("No callback registered for TaskAttemptID:" + key + ". Skipping."); return; } try { LOG.info("Committing TaskAttempt:" + key); taskCommitters.get(key).commitTask(context); } catch (Throwable t) { throw new IOException("Could not clean up TaskAttemptID:" + key, t); } }
/** * Trigger abort for TaskAttempt, as specified by the TaskAttemptContext argument. */ public synchronized void abortTask(TaskAttemptContext context) throws IOException { String key = generateKey(context); if (!taskCommitters.containsKey(key)) { LOG.warn("No callback registered for TaskAttemptID:" + key + ". Skipping."); return; } try { LOG.info("Aborting TaskAttempt:" + key); taskCommitters.get(key).abortTask(context); } catch (Throwable t) { throw new IOException("Could not clean up TaskAttemptID:" + key, t); } }
/** * Trigger abort for TaskAttempt, as specified by the TaskAttemptContext argument. */ public synchronized void abortTask(TaskAttemptContext context) throws IOException { String key = generateKey(context); if (!taskCommitters.containsKey(key)) { LOG.warn("No callback registered for TaskAttemptID:" + key + ". Skipping."); return; } try { LOG.info("Aborting TaskAttempt:" + key); taskCommitters.get(key).abortTask(context); } catch (Throwable t) { throw new IOException("Could not clean up TaskAttemptID:" + key, t); } }
/** * Method to register call-backs to control commits and aborts of TaskAttempts. * @param context The TaskAttemptContext instance for the task-attempt, identifying the output. * @param committer Instance of TaskCommitterProxy, to commit/abort a TaskAttempt. * @throws java.io.IOException On failure. */ public synchronized void register(TaskAttemptContext context, TaskCommitterProxy committer) throws IOException { String key = generateKey(context); LOG.info("Registering committer for TaskAttemptID:" + key); if (taskCommitters.containsKey(key)) { LOG.warn("Replacing previous committer:" + committer); } taskCommitters.put(key, committer); }
/** * Method to discard the committer call-backs for a specified TaskAttemptID. * @param context The TaskAttemptContext instance for the task-attempt, identifying the output. * @throws java.io.IOException On failure. */ public synchronized void discardCleanupFor(TaskAttemptContext context) throws IOException { String key = generateKey(context); LOG.info("Discarding all cleanup for TaskAttemptID:" + key); if (!taskCommitters.containsKey(key)) { LOG.warn("No committer registered for TaskAttemptID:" + key); } else { taskCommitters.remove(key); } }
/** * Trigger abort for TaskAttempt, as specified by the TaskAttemptContext argument. */ public synchronized void abortTask(TaskAttemptContext context) throws IOException { String key = generateKey(context); if (!taskCommitters.containsKey(key)) { LOG.warn("No callback registered for TaskAttemptID:" + key + ". Skipping."); return; } try { LOG.info("Aborting TaskAttempt:" + key); taskCommitters.get(key).abortTask(context); } catch (Throwable t) { throw new IOException("Could not clean up TaskAttemptID:" + key, t); } }
/** * Trigger commit for TaskAttempt, as specified by the TaskAttemptContext argument. */ public synchronized void commitTask(TaskAttemptContext context) throws IOException { String key = generateKey(context); if (!taskCommitters.containsKey(key)) { LOG.warn("No callback registered for TaskAttemptID:" + key + ". Skipping."); return; } try { LOG.info("Committing TaskAttempt:" + key); taskCommitters.get(key).commitTask(context); } catch (Throwable t) { throw new IOException("Could not clean up TaskAttemptID:" + key, t); } }