Interface Committer.CommitRequest<CommT>

  • Type Parameters:
    CommT -
    Enclosing interface:
    Committer<CommT>

    @Public
    public static interface Committer.CommitRequest<CommT>
    A request to commit a specific committable.
    • 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 (see retryLater() 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.