-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
base: master
Are you sure you want to change the base?
[HUDI-8726] Test hollow commit handling for table version 8 #12708
Conversation
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.
a9abe6e
to
8915a8e
Compare
Test hollow commit handling in both old and new table version and timeline layout version.
8915a8e
to
6bca2e4
Compare
/** | ||
* Utils for creating dummy Hudi files in testing. | ||
*/ | ||
public class FileCreateUtilsV2 extends FileCreateUtilsBase { |
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.
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.
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.
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" |
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.
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
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
.setTableName("testTable") | ||
.setTimelineLayoutVersion(timelineLayoutVersion.getVersion()) | ||
.setTableVersion(tableVersion) | ||
.setTableType(HoodieTableType.MERGE_ON_READ).initTable(getDefaultStorageConf(), basePath); |
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 validate the table version matches after instantiation.
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
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