-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Generate changelog by copying data when records are insert-only #3568
[core] Generate changelog by copying data when records are insert-only #3568
Conversation
e717993
to
ea06094
Compare
Hi @JingsongLi could you please take a look at this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yunfengzhou-hub Thanks for the PR. I left some comments below.
paimon-core/src/main/java/org/apache/paimon/mergetree/MergeTreeWriter.java
Outdated
Show resolved
Hide resolved
paimon-core/src/main/java/org/apache/paimon/privilege/PrivilegedFileStore.java
Outdated
Show resolved
Hide resolved
paimon-core/src/main/java/org/apache/paimon/privilege/PrivilegedFileStoreTable.java
Outdated
Show resolved
Hide resolved
paimon-core/src/main/java/org/apache/paimon/table/AppendOnlyFileStoreTable.java
Outdated
Show resolved
Hide resolved
ea06094
to
b368104
Compare
paimon-core/src/main/java/org/apache/paimon/utils/BucketRecordAttributeManager.java
Outdated
Show resolved
Hide resolved
paimon-core/src/main/java/org/apache/paimon/io/KeyValueFileWriterFactory.java
Outdated
Show resolved
Hide resolved
paimon-core/src/test/java/org/apache/paimon/mergetree/MergeTreeTestBase.java
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fs/local/LocalFileIO.java
Outdated
Show resolved
Hide resolved
019d7ee
to
70d1fab
Compare
Thanks for the comments @JingsongLi. I have updated the PR according to the comments. |
70d1fab
to
60dd650
Compare
paimon-core/src/main/java/org/apache/paimon/table/AppendOnlyFileStoreTable.java
Outdated
Show resolved
Hide resolved
742b9e2
to
fbd68e8
Compare
...n-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/FlinkSinkBuilder.java
Outdated
Show resolved
Hide resolved
...-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/DynamicBucketSink.java
Outdated
Show resolved
Hide resolved
// and remove the following code block if proved to be of no regression. | ||
boolean isCopyMethodOverridden; | ||
try { | ||
isCopyMethodOverridden = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just introduce a new FileIO interface?
interface NativeCopyFileIO extends FileIO {
void nativeCopy(Path src, Path dst);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to offline discussion, I benchmarked the throughput of the default implementation introduced in FileIO in Aliyun, and it seems that the default implementation has been enough to bring performance improvement. I did not verify against other filesystems, but theoretically speaking copying should also bring performance improvement to them. Given this result, I'll directly add the copy method to FileIO, instead of introducing the new NativeCopyFileIO interface.
paimon-filesystems/paimon-oss-impl/src/main/java/org/apache/paimon/oss/OSSFileIO.java
Outdated
Show resolved
Hide resolved
paimon-filesystems/paimon-oss-impl/src/main/java/org/apache/paimon/oss/OSSFileIO.java
Outdated
Show resolved
Hide resolved
fbd68e8
to
989b717
Compare
paimon-core/src/main/java/org/apache/paimon/mergetree/MergeTreeWriter.java
Outdated
Show resolved
Hide resolved
paimon-core/src/main/java/org/apache/paimon/mergetree/MergeTreeWriter.java
Outdated
Show resolved
Hide resolved
989b717
to
62d34d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@yunfengzhou-hub hi, when will |
Purpose
Linked issue: #3567
Tests
API and Format
This PR does not affect API or storage format.
Documentation
This PR does not add a new feature that requires document.