You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/08/15 14:52:55 UTC
[GitHub] [hudi] nsivabalan commented on a diff in pull request #6374: [HUDI-4608] Fix upgrade command in Hudi CLI
nsivabalan commented on code in PR #6374:
URL: https://github.com/apache/hudi/pull/6374#discussion_r945832105
##########
hudi-cli/src/test/java/org/apache/hudi/cli/commands/TestUpgradeDowngradeCommand.java:
##########
@@ -83,10 +88,32 @@ public void init() throws Exception {
.withMarkerFile(DEFAULT_THIRD_PARTITION_PATH, "file-3", IOType.MERGE);
}
- @Test
- public void testDowngradeCommand() throws Exception {
- // update hoodie.table.version to 1
- metaClient.getTableConfig().setTableVersion(HoodieTableVersion.ONE);
+ @AfterEach
+ public void cleanup() {
+ if (timelineService != null) {
+ timelineService.close();
+ }
+ }
+
+ private static Stream<Arguments> testArgsForUpgradeDowngradeCommand() {
+ return Arrays.stream(new HoodieTableVersion[][] {
+ {HoodieTableVersion.FIVE, HoodieTableVersion.ZERO},
+ {HoodieTableVersion.ZERO, HoodieTableVersion.ONE},
+ // Table upgrade from version ONE to TWO requires key generator related configs
+ // such as "hoodie.datasource.write.recordkey.field" which is only available
+ // when user configures the write job. So the table upgrade from version ONE to TWO
+ // through CLI is not supported, and user should rely on the automatic upgrade
+ // in the write client instead.
+ // {HoodieTableVersion.ONE, HoodieTableVersion.TWO},
+ {HoodieTableVersion.TWO, HoodieTableVersion.FIVE}
Review Comment:
curious: why we did not add all possible upgrade and downgrade combinations here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org