JingsongLi opened a new pull request #22:
URL: https://github.com/apache/flink-table-store/pull/22


   This PR creates a new Sink interface: `GlobalCommittingSink`.
   ```
   /**
    * The {@code GlobalCommitter} is responsible for creating and committing an 
aggregated committable,
    * which we call global committable (see {@link #combine}).
    *
    * <p>The {@code GlobalCommitter} runs with parallelism equal to 1.
    *
    * @param <CommT> The type of information needed to commit data staged by 
the sink
    * @param <GlobalCommT> The type of the aggregated committable
    */
   public interface GlobalCommitter<CommT, GlobalCommT> extends AutoCloseable {
   
       /** Find out which global committables need to be retried when 
recovering from the failure. */
       List<GlobalCommT> filterRecoveredCommittables(List<GlobalCommT> 
globalCommittables)
               throws IOException;
   
       /** Compute an aggregated committable from a list of committables. */
       GlobalCommT combine(long checkpointId, List<CommT> committables) throws 
IOException;
   
       /** Commits the given {@link GlobalCommT}. */
       void commit(List<GlobalCommT> globalCommittables) throws IOException, 
InterruptedException;
   }
   ```
   Because StoreSink committing needs to rely on checkpointId and needs to call 
the `filterRecoveredCommittables` interface carefully, a global commit 
mechanism similar to SinkV1 is created.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to