Interface Committer<CommT>
-
- Type Parameters:
CommT
- The type of information needed to commit the staged data
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
FileCommitter
@Public public interface Committer<CommT> extends AutoCloseable
TheCommitter
is responsible for committing the data staged by theCommittingSinkWriter
in the second step of a two-phase commit protocol.A commit must be idempotent: If some failure occurs in Flink during commit phase, Flink will restart from previous checkpoint and re-attempt to commit all committables. Thus, some or all committables may have already been committed. These
Committer.CommitRequest
s must not change the external system and implementers are asked to signalCommitter.CommitRequest.signalAlreadyCommitted()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Committer.CommitRequest<CommT>
A request to commit a specific committable.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
commit(Collection<Committer.CommitRequest<CommT>> committables)
Commit the given list ofCommitter
.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
commit
void commit(Collection<Committer.CommitRequest<CommT>> committables) throws IOException, InterruptedException
Commit the given list ofCommitter
.- Parameters:
committables
- A list of commit requests staged by the sink writer.- Throws:
IOException
- for reasons that may yield a complete restart of the job.InterruptedException
-
-