Interface GlobalCommitter<CommT,GlobalCommT>
-
- Type Parameters:
CommT- The type of information needed to commit data staged by the sinkGlobalCommT- The type of the aggregated committable
- All Superinterfaces:
AutoCloseable
@Deprecated @PublicEvolving public interface GlobalCommitter<CommT,GlobalCommT> extends AutoCloseable
Deprecated.Please useWithPostCommitTopologywithStandardSinkTopologies#addGlobalCommitter.TheGlobalCommitteris responsible for creating and committing an aggregated committable, which we call global committable (seecombine(java.util.List<CommT>)).The
GlobalCommitterruns with parallelism equal to 1.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description GlobalCommTcombine(List<CommT> committables)Deprecated.Compute an aggregated committable from a list of committables.List<GlobalCommT>commit(List<GlobalCommT> globalCommittables)Deprecated.Commits the given list ofGlobalCommitterand returns a list ofGlobalCommitterthat need to be re-committed.voidendOfInput()Deprecated.Signals that there is no committable any more.List<GlobalCommT>filterRecoveredCommittables(List<GlobalCommT> globalCommittables)Deprecated.Find out which global committables need to be retried when recovering from the failure.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
filterRecoveredCommittables
List<GlobalCommT> filterRecoveredCommittables(List<GlobalCommT> globalCommittables) throws IOException
Deprecated.Find out which global committables need to be retried when recovering from the failure.- Parameters:
globalCommittables- A list ofGlobalCommitterfor which we want to verify which ones were successfully committed and which ones did not.- Returns:
- A list of
GlobalCommitterthat should be committed again. - Throws:
IOException- if fail to filter the recovered committables.
-
combine
GlobalCommT combine(List<CommT> committables) throws IOException
Deprecated.Compute an aggregated committable from a list of committables.- Parameters:
committables- A list ofGlobalCommitterto be combined into aGlobalCommitter.- Returns:
- an aggregated committable
- Throws:
IOException- if fail to combine the given committables.
-
commit
List<GlobalCommT> commit(List<GlobalCommT> globalCommittables) throws IOException, InterruptedException
Deprecated.Commits the given list ofGlobalCommitterand returns a list ofGlobalCommitterthat need to be re-committed. The elements of the return list must be a subset of the input list, so that successful committables can be inferred.- Parameters:
globalCommittables- a list ofGlobalCommitter.- Returns:
- a list of
GlobalCommitterthat need to be re-committed. - Throws:
IOException- if the commit operation fail and do not want to retry any more.InterruptedException
-
endOfInput
void endOfInput() throws IOException, InterruptedExceptionDeprecated.Signals that there is no committable any more.- Throws:
IOException- if fail to handle this notification.InterruptedException
-
-