@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.
CommitMessage
s, 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 CommitMessage s. |
StreamTableWrite |
newWrite()
Create a
TableWrite to write InternalRow s. |
StreamWriteBuilder |
withCommitUser(String commitUser)
Set commit user, the default value is a random UUID.
|
newWriteSelector, rowType, tableName
String 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 InternalRow
s.newWrite
in interface WriteBuilder
StreamTableCommit newCommit()
TableCommit
to commit CommitMessage
s.newCommit
in interface WriteBuilder
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.