@Public public interface StreamWriteBuilder extends WriteBuilder
StreamTableWrite and StreamTableCommit.
Key points to achieve exactly-once consistency:
StreamTableWrite and StreamTableCommit needs to be
consistent, and the id needs to be incremented for the next committing.
CommitMessages, please retry
with StreamTableCommit.filterAndCommit(java.util.Map<java.lang.Long, java.util.List<org.apache.paimon.table.sink.CommitMessage>>) to exclude the committed messages by
commitIdentifier.
| Modifier and Type | Method and Description |
|---|---|
String |
commitUser()
Get commit user, set by
withCommitUser(java.lang.String). |
StreamTableCommit |
newCommit()
Create a
TableCommit to commit CommitMessages. |
StreamTableWrite |
newWrite()
Create a
TableWrite to write InternalRows. |
StreamWriteBuilder |
withCommitUser(String commitUser)
Set commit user, the default value is a random UUID.
|
newWriteSelector, rowType, tableNameString commitUser()
withCommitUser(java.lang.String).StreamWriteBuilder withCommitUser(String commitUser)
TableWrite and TableCommit must be the same, otherwise there will be some conflicts.StreamTableWrite newWrite()
TableWrite to write InternalRows.newWrite in interface WriteBuilderStreamTableCommit newCommit()
TableCommit to commit CommitMessages.newCommit in interface WriteBuilderCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.