-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[HUDI-5253] HoodieMergeOnReadTableInputFormat could have duplicate records issue if it contains delta files while still splittable #7264
Conversation
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/realtime/HoodieRealtimePath.java
Show resolved
Hide resolved
@hudi-bot run azure |
1 similar comment
@hudi-bot run azure |
@danny0405 @xushiyan could you please take a look? |
HoodieLogFile logFile = new HoodieLogFile(fs.getFileStatus(new Path(logPath))); | ||
rtPath = new HoodieRealtimePath(new Path("foo"), "bar", basePath.toString(), Collections.singletonList(logFile), "000", false, Option.empty()); | ||
assertFalse(new HoodieMergeOnReadTableInputFormat().isSplitable(fs, rtPath), "Path for bootstrap should not be splitable."); | ||
} |
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.
Path for bootstrap should not be splitable
Is the error message right ?
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.
done
void pathNotSplitableIfContainsDeltaFiles() throws IOException { | ||
URI basePath = Files.createTempFile(tempDir, "target", ".parquet").toUri(); | ||
HoodieRealtimePath rtPath = new HoodieRealtimePath(new Path("foo"), "bar", basePath.toString(), Collections.emptyList(), "000", false, Option.empty()); | ||
assertTrue(new HoodieMergeOnReadTableInputFormat().isSplitable(fs, rtPath)); |
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.
Supplement the error message.
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
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.
Good catch!
…cords issue if it contains delta files while still splittable (#7264)
…cords issue if it contains delta files while still splittable (apache#7264)
…cords issue if it contains delta files while still splittable (apache#7264)
…cords issue if it contains delta files while still splittable (apache#7264)
…cords issue if it contains delta files while still splittable (apache#7264)
…cords issue if it contains delta files while still splittable (apache#7264)
…cords issue if it contains delta files while still splittable (apache#7264)
Change Logs
If
HoodieRealtimePath
contains delta files, it cannot splittableImpact
We can also find that sometimes could throw {{IllegalStateException}} duplicates key error when we run the CI.
We can easily to reproduce this in
org.apache.hudi.testutils.HoodieMergeOnReadTestUtils#getRecordsUsingInputFormat
to allow it create more splitsRisk level (write none, low medium or high below)
low
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change
ticket number here and follow the instruction to make
changes to the website.
Contributor's checklist