This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git
The following commit(s) were added to refs/heads/master by this push:
new ba9a1cb62 [doc] document TableCommit#abort java api (#905)
ba9a1cb62 is described below
commit ba9a1cb62c1ad8402b022bf9e09d253258084e3c
Author: Nicholas Jiang <[email protected]>
AuthorDate: Mon Apr 17 09:33:48 2023 +0800
[doc] document TableCommit#abort java api (#905)
---
docs/content/api/java-api.md | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/docs/content/api/java-api.md b/docs/content/api/java-api.md
index 3e4ffe243..1450b8035 100644
--- a/docs/content/api/java-api.md
+++ b/docs/content/api/java-api.md
@@ -191,7 +191,8 @@ public class ReadTable {
The writing is divided into two stages:
1. Write records: Write records in distributed tasks, generate commit messages.
-2. Commit: Collect all CommitMessages, commit them in a global node
('Coordinator', or named 'Driver', or named 'Committer').
+2. Commit/Abort: Collect all CommitMessages, commit them in a global node
('Coordinator', or named 'Driver', or named 'Committer').
+ When the commit fails for certain reason, abort unsuccessful commit via
CommitMessages.
```java
import java.util.List;
@@ -218,6 +219,9 @@ public class WriteTable {
// 3. Collect all CommitMessages to a global node and commit
BatchTableCommit commit = writeBuilder.newCommit();
commit.commit(messages);
+
+ // Abort unsuccessful commit to delete data files
+ // commit.abort(messages);
}
}
```