[HUDI-3855] Fixing FILENAME_METADATA_FIELD not being correctly updated in HoodieMergeHandle#5296
Merged
nsivabalan merged 9 commits intoapache:masterfrom Apr 13, 2022
Merged
Conversation
added 8 commits
April 11, 2022 23:21
…mply old record is carried over
nsivabalan
reviewed
Apr 12, 2022
Contributor
nsivabalan
left a comment
There was a problem hiding this comment.
good find on the gap. I should have caught this when I worked on compaction preserve metadata. my bad.
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java
Show resolved
Hide resolved
Contributor
Author
|
@hudi-bot run azure |
nsivabalan
approved these changes
Apr 12, 2022
danny0405
reviewed
Apr 13, 2022
|
|
||
| protected void writeToFile(HoodieKey key, GenericRecord avroRecord, boolean shouldPreserveRecordMetadata) throws IOException { | ||
| if (shouldPreserveRecordMetadata) { | ||
| // NOTE: `FILENAME_METADATA_FIELD` has to be rewritten to correctly point to the |
Contributor
There was a problem hiding this comment.
Can create handle reuse this method ?
Contributor
Author
There was a problem hiding this comment.
Totally. Previously it relied on preserveMetadata fields which were not available in CreateHandle, so had to bail on moving it to WriteHandle class, but then after refactoring forgot to update CreateHandle
Contributor
Author
There was a problem hiding this comment.
I do want to review all handles more holistically and cleanup quite a bit of duplication and unnecessary complication that we've currently amassed.
Contributor
There was a problem hiding this comment.
It is great if you can do that.
xushiyan
pushed a commit
that referenced
this pull request
Apr 14, 2022
…ted in `HoodieMergeHandle` (#5296) Fixing FILENAME_METADATA_FIELD not being correctly updated in HoodieMergeHandle, in cases when old-record is carried over from existing file as is. - Revisited HoodieFileWriter API to accept HoodieKey instead of HoodieRecord - Fixed FILENAME_METADATA_FIELD not being overridden in cases when simply old record is carried over - Exposing standard JVM's debugger ports in Docker setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tips
What is the purpose of the pull request
Fixing
FILENAME_METADATA_FIELDnot being correctly updated inHoodieMergeHandle, in cases when old-record is carried over from existing file as is.Brief change log
HoodieRecordVerify this pull request
This pull request is already covered by existing tests, such as (please describe tests).
This change added tests and can be verified as follows:
Committer checklist
Has a corresponding JIRA in PR title & commit
Commit message is descriptive of the change
CI is green
Necessary doc changes done or have another open PR
For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.