/** * Fails all pending checkpoints which have not been acknowledged by the given execution * attempt id. * * @param executionAttemptId for which to discard unacknowledged pending checkpoints * @param cause of the failure */ public void failUnacknowledgedPendingCheckpointsFor(ExecutionAttemptID executionAttemptId, Throwable cause) { synchronized (lock) { Iterator<PendingCheckpoint> pendingCheckpointIterator = pendingCheckpoints.values().iterator(); while (pendingCheckpointIterator.hasNext()) { final PendingCheckpoint pendingCheckpoint = pendingCheckpointIterator.next(); if (!pendingCheckpoint.isAcknowledgedBy(executionAttemptId)) { pendingCheckpointIterator.remove(); discardCheckpoint(pendingCheckpoint, cause); } } } }
/** * Fails all pending checkpoints which have not been acknowledged by the given execution * attempt id. * * @param executionAttemptId for which to discard unacknowledged pending checkpoints * @param cause of the failure */ public void failUnacknowledgedPendingCheckpointsFor(ExecutionAttemptID executionAttemptId, Throwable cause) { synchronized (lock) { Iterator<PendingCheckpoint> pendingCheckpointIterator = pendingCheckpoints.values().iterator(); while (pendingCheckpointIterator.hasNext()) { final PendingCheckpoint pendingCheckpoint = pendingCheckpointIterator.next(); if (!pendingCheckpoint.isAcknowledgedBy(executionAttemptId)) { pendingCheckpointIterator.remove(); discardCheckpoint(pendingCheckpoint, cause); } } } }
/** * Fails all pending checkpoints which have not been acknowledged by the given execution * attempt id. * * @param executionAttemptId for which to discard unacknowledged pending checkpoints * @param cause of the failure */ public void failUnacknowledgedPendingCheckpointsFor(ExecutionAttemptID executionAttemptId, Throwable cause) { synchronized (lock) { Iterator<PendingCheckpoint> pendingCheckpointIterator = pendingCheckpoints.values().iterator(); while (pendingCheckpointIterator.hasNext()) { final PendingCheckpoint pendingCheckpoint = pendingCheckpointIterator.next(); if (!pendingCheckpoint.isAcknowledgedBy(executionAttemptId)) { pendingCheckpointIterator.remove(); discardCheckpoint(pendingCheckpoint, cause); } } } }
discardCheckpoint(checkpoint, message.getReason());
discardCheckpoint(checkpoint, message.getReason());
discardCheckpoint(checkpoint, message.getReason());