You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by fp...@apache.org on 2022/01/13 08:23:59 UTC

[flink] 01/06: [hotfix][core] Fix javadoc in (Global)committer for retries.

This is an automated email from the ASF dual-hosted git repository.

fpaul pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 3bffb13d391510d63cd89412472e1c1f22fe8f4a
Author: Arvid Heise <ar...@ververica.com>
AuthorDate: Tue Jan 4 15:09:55 2022 +0100

    [hotfix][core] Fix javadoc in (Global)committer for retries.
---
 .../main/java/org/apache/flink/api/connector/sink/Committer.java   | 7 ++++---
 .../java/org/apache/flink/api/connector/sink/GlobalCommitter.java  | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/flink-core/src/main/java/org/apache/flink/api/connector/sink/Committer.java b/flink-core/src/main/java/org/apache/flink/api/connector/sink/Committer.java
index ece99e0..8488271 100644
--- a/flink-core/src/main/java/org/apache/flink/api/connector/sink/Committer.java
+++ b/flink-core/src/main/java/org/apache/flink/api/connector/sink/Committer.java
@@ -33,11 +33,12 @@ import java.util.List;
 public interface Committer<CommT> extends AutoCloseable {
 
     /**
-     * Commit the given list of {@link CommT}.
+     * Commits the given list of {@link CommT} and returns a list of {@link CommT} that 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.
      *
      * @param committables A list of information needed to commit data staged by the sink.
-     * @return A list of {@link CommT} needed to re-commit, which is needed in case we implement a
-     *     "commit-with-retry" pattern.
+     * @return a list of {@link CommT} that need to be re-committed.
      * @throws IOException if the commit operation fail and do not want to retry any more.
      */
     List<CommT> commit(List<CommT> committables) throws IOException, InterruptedException;
diff --git a/flink-core/src/main/java/org/apache/flink/api/connector/sink/GlobalCommitter.java b/flink-core/src/main/java/org/apache/flink/api/connector/sink/GlobalCommitter.java
index c3bc5ea..7d2b424 100644
--- a/flink-core/src/main/java/org/apache/flink/api/connector/sink/GlobalCommitter.java
+++ b/flink-core/src/main/java/org/apache/flink/api/connector/sink/GlobalCommitter.java
@@ -57,11 +57,12 @@ public interface GlobalCommitter<CommT, GlobalCommT> extends AutoCloseable {
     GlobalCommT combine(List<CommT> committables) throws IOException;
 
     /**
-     * Commit the given list of {@link GlobalCommT}.
+     * Commits the given list of {@link GlobalCommT} and returns a list of {@link GlobalCommT} that
+     * 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.
      *
      * @param globalCommittables a list of {@link GlobalCommT}.
-     * @return A list of {@link GlobalCommT} needed to re-commit, which is needed in case we
-     *     implement a "commit-with-retry" pattern.
+     * @return a list of {@link GlobalCommT} that need to be re-committed.
      * @throws IOException if the commit operation fail and do not want to retry any more.
      */
     List<GlobalCommT> commit(List<GlobalCommT> globalCommittables)