CommT
- type of committable@Internal public class CommitRequestImpl<CommT> extends Object implements Committer.CommitRequest<CommT>
Modifier | Constructor and Description |
---|---|
protected |
CommitRequestImpl(CommT committable,
int numRetries,
CommitRequestState state,
SinkCommitterMetricGroup metricGroup) |
protected |
CommitRequestImpl(CommT committable,
SinkCommitterMetricGroup metricGroup) |
Modifier and Type | Method and Description |
---|---|
CommT |
getCommittable()
Returns the committable.
|
int |
getNumberOfRetries()
Returns how many times this particular committable has been retried.
|
void |
retryLater()
The commit failed for a retriable reason.
|
void |
signalAlreadyCommitted()
Signals that a committable is skipped as it was committed already in a previous run.
|
void |
signalFailedWithKnownReason(Throwable t)
The commit failed for known reason and should not be retried.
|
void |
signalFailedWithUnknownReason(Throwable t)
The commit failed for unknown reason and should not be retried.
|
void |
updateAndRetryLater(CommT committable)
Updates the underlying committable and retries later (see
Committer.CommitRequest.retryLater() for a
description). |
protected CommitRequestImpl(CommT committable, SinkCommitterMetricGroup metricGroup)
protected CommitRequestImpl(CommT committable, int numRetries, CommitRequestState state, SinkCommitterMetricGroup metricGroup)
public CommT getCommittable()
Committer.CommitRequest
getCommittable
in interface Committer.CommitRequest<CommT>
public int getNumberOfRetries()
Committer.CommitRequest
getNumberOfRetries
in interface Committer.CommitRequest<CommT>
public void signalFailedWithKnownReason(Throwable t)
Committer.CommitRequest
Currently calling this method only logs the error, discards the comittable and continues. In the future the behaviour might be configurable.
signalFailedWithKnownReason
in interface Committer.CommitRequest<CommT>
public void signalFailedWithUnknownReason(Throwable t)
Committer.CommitRequest
Currently calling this method fails the job. In the future the behaviour might be configurable.
signalFailedWithUnknownReason
in interface Committer.CommitRequest<CommT>
public void retryLater()
Committer.CommitRequest
retryLater
in interface Committer.CommitRequest<CommT>
public void updateAndRetryLater(CommT committable)
Committer.CommitRequest
Committer.CommitRequest.retryLater()
for a
description). This method can be used if a committable partially succeeded.updateAndRetryLater
in interface Committer.CommitRequest<CommT>
public void signalAlreadyCommitted()
Committer.CommitRequest
signalAlreadyCommitted
in interface Committer.CommitRequest<CommT>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.