Skip to content
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-8726] Test hollow commit handling for table version 8 #12708

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Davis-Zhang-Onehouse
Copy link
Contributor

@Davis-Zhang-Onehouse Davis-Zhang-Onehouse commented Jan 25, 2025

Change Logs

1st commit
Revised the test utils so it can work in both table version 6 timeline
layout 1 and table version 8 and timeline layout 2 mode. Previously as
all the metafolder path and the completion instant file names are are
hard coded, so they cannot accommodate based on the given version.

FileCreateUtilsV2 is introduced which takes metaClient as input to solve
this issue. We should use this as opposed to old FileCreateUtilsV2 in
the future.

2nd commit
Test hollow commit handling in both old and new table version and
timeline layout version.

Impact

better test coverage

Risk level (write none, low medium or high below)

none

Documentation Update

none

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@github-actions github-actions bot added the size:XL PR with lines of changes > 1000 label Jan 25, 2025
Revised the test utils so it can work in both table version 6 timeline
layout 1 and table version 8 and timeline layout 2 mode. Previously as
all the metafolder path and the completion instant file names are are
hard coded, so they cannot accommodate based on the given version.

FileCreateUtilsV2 is introduced which takes metaClient as input to solve
this issue. We should use this as opposed to old FileCreateUtilsV2 in
the future.
@Davis-Zhang-Onehouse Davis-Zhang-Onehouse changed the title Hudi 8726 todo2 [HUDI-8726] Test hollow commit handling for table version 8 Jan 25, 2025
Test hollow commit handling in both old and new table version and
timeline layout version.
/**
* Utils for creating dummy Hudi files in testing.
*/
public class FileCreateUtilsV2 extends FileCreateUtilsBase {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why V2 create Utils?
for source code, generally V2 makes sense. but for test utils, why do we need V2?
why can't we fix exiting utils class only.

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 tried and after 4 hrs here is what it turns out to be #12712 :)
It requires another 4 hrs looking into individual test failures.

"BLOCK, SIX, VERSION_1",
"BLOCK, EIGHT, VERSION_2",
"USE_TRANSITION_TIME, SIX, VERSION_1",
"USE_TRANSITION_TIME, EIGHT, VERSION_2"
Copy link
Contributor

Choose a reason for hiding this comment

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

timeline layout versions are tied to table version. 6 is for 1 and 8 is to 2. So, why make 2 args. we could just make args as

HollowCommitHandling handlingMode,
                             HoodieTableVersion tableVersion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

.setTableName("testTable")
.setTimelineLayoutVersion(timelineLayoutVersion.getVersion())
.setTableVersion(tableVersion)
.setTableType(HoodieTableType.MERGE_ON_READ).initTable(getDefaultStorageConf(), basePath);
Copy link
Contributor

Choose a reason for hiding this comment

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

can we validate the table version matches after instantiation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@hudi-bot
Copy link

CI report:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL PR with lines of changes > 1000
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants