Skip to content

Comments

[HUDI-3855] Fixing FILENAME_METADATA_FIELD not being correctly updated in HoodieMergeHandle#5296

Merged
nsivabalan merged 9 commits intoapache:masterfrom
onehouseinc:ak/mtd-fn-fix
Apr 13, 2022
Merged

[HUDI-3855] Fixing FILENAME_METADATA_FIELD not being correctly updated in HoodieMergeHandle#5296
nsivabalan merged 9 commits intoapache:masterfrom
onehouseinc:ak/mtd-fn-fix

Conversation

@alexeykudinkin
Copy link
Contributor

Tips

What is the purpose of the pull request

Fixing FILENAME_METADATA_FIELD not being correctly updated in HoodieMergeHandle, in cases when old-record is carried over from existing file as is.

Brief change log

  • 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

Verify 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.

Copy link
Contributor

@nsivabalan nsivabalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find on the gap. I should have caught this when I worked on compaction preserve metadata. my bad.

@nsivabalan nsivabalan added the priority:blocker Production down; release blocker label Apr 12, 2022
@alexeykudinkin
Copy link
Contributor Author

@hudi-bot run azure

@hudi-bot
Copy link
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@nsivabalan nsivabalan merged commit 7b78dff into apache:master 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can create handle reuse this method ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do want to review all handles more holistically and cleanup quite a bit of duplication and unnecessary complication that we've currently amassed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:blocker Production down; release blocker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants