yihua commented on code in PR #12826:
URL: https://github.com/apache/hudi/pull/12826#discussion_r1974141745


##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/CompactionCommand.java:
##########
@@ -125,9 +124,7 @@ public String compactionShow(
     HoodieTableMetaClient client = checkAndGetMetaClient();
     HoodieActiveTimeline activeTimeline = client.getActiveTimeline();
     InstantGenerator instantGenerator = client.getInstantGenerator();
-    HoodieCompactionPlan compactionPlan = 
TimelineMetadataUtils.deserializeCompactionPlan(
-        activeTimeline.readCompactionPlanAsBytes(
-            
instantGenerator.getCompactionRequestedInstant(compactionInstantTime)).get());
+    HoodieCompactionPlan compactionPlan = 
activeTimeline.loadCompactionPlan(instantGenerator.getCompactionRequestedInstant(compactionInstantTime));

Review Comment:
   Similar here. Could we get rid of `loadCompactionPlan` and unify the API?



##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/RestoresCommand.java:
##########
@@ -98,9 +96,7 @@ public String showRestore(
   private void addDetailsOfCompletedRestore(HoodieActiveTimeline 
activeTimeline, List<Comparable[]> rows,
                                             HoodieInstant restoreInstant) 
throws IOException {
     HoodieRestoreMetadata instantMetadata;
-    Option<byte[]> instantDetails = 
activeTimeline.getInstantDetails(restoreInstant);
-    instantMetadata = TimelineMetadataUtils
-            .deserializeAvroMetadata(instantDetails.get(), 
HoodieRestoreMetadata.class);
+    instantMetadata = activeTimeline.loadInstantContent(restoreInstant, 
HoodieRestoreMetadata.class);

Review Comment:
   nit: can be merged with the previous line



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