Interface Committer.CommitRequest<CommT>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommTgetCommittable()Returns the committable.intgetNumberOfRetries()Returns how many times this particular committable has been retried.voidretryLater()The commit failed for a retriable reason.voidsignalAlreadyCommitted()Signals that a committable is skipped as it was committed already in a previous run.voidsignalFailedWithKnownReason(Throwable t)The commit failed for known reason and should not be retried.voidsignalFailedWithUnknownReason(Throwable t)The commit failed for unknown reason and should not be retried.voidupdateAndRetryLater(CommT committable)Updates the underlying committable and retries later (seeretryLater()for a description).
-
-
-
Method Detail
-
getCommittable
CommT getCommittable()
Returns the committable.
-
getNumberOfRetries
int getNumberOfRetries()
Returns how many times this particular committable has been retried. Starts at 0 for the first attempt.
-
signalFailedWithKnownReason
void signalFailedWithKnownReason(Throwable t)
The commit failed for known reason and should not be retried.Currently calling this method only logs the error, discards the comittable and continues. In the future the behaviour might be configurable.
-
signalFailedWithUnknownReason
void signalFailedWithUnknownReason(Throwable t)
The commit failed for unknown reason and should not be retried.Currently calling this method fails the job. In the future the behaviour might be configurable.
-
retryLater
void retryLater()
The commit failed for a retriable reason. If the sink supports a retry maximum, this may permanently fail after reaching that maximum. Else the committable will be retried as long as this method is invoked after each attempt.
-
updateAndRetryLater
void updateAndRetryLater(CommT committable)
Updates the underlying committable and retries later (seeretryLater()for a description). This method can be used if a committable partially succeeded.
-
signalAlreadyCommitted
void signalAlreadyCommitted()
Signals that a committable is skipped as it was committed already in a previous run. Using this method is optional but eases bookkeeping and debugging. It also serves as a code documentation for the branches dealing with recovery.
-
-