codope commented on code in PR #12250:
URL: https://github.com/apache/hudi/pull/12250#discussion_r1842440029


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngradeUtils.java:
##########
@@ -107,4 +132,95 @@ static void updateMetadataTableVersion(HoodieEngineContext 
context, HoodieTableV
       throw new HoodieIOException("Error while updating metadata table 
version", e);
     }
   }
+
+  static void upgradeToLSMTimeline(HoodieTable table, HoodieEngineContext 
engineContext, HoodieWriteConfig config) {
+    // migrate archived timeline
+    LSMTimelineWriter lsmTimelineWriter = 
LSMTimelineWriter.getInstance(config, table);
+    HoodieArchivedTimeline archivedTimeline = 
table.getMetaClient().getArchivedTimeline();
+    Consumer<Exception> exceptionHandler = e -> {
+      if (config.isFailOnTimelineArchivingEnabled()) {
+        throw new HoodieException(e);
+      }
+    };
+    
lsmTimelineWriter.write(Collections.singletonList(ActiveAction.fromInstants(archivedTimeline.getInstants())),

Review Comment:
   Yes, i thought about it and I agree. I wanted to quickly do some local 
testing to validate the upgrade path. I will do the batching soon.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to