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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -991,7 +989,7 @@ private static void 
deletePendingIndexingInstant(HoodieTableMetaClient metaClien
     
metaClient.reloadActiveTimeline().filterPendingIndexTimeline().getInstantsAsStream().filter(instant
 -> REQUESTED.equals(instant.getState()))
         .forEach(instant -> {
           try {
-            HoodieIndexPlan indexPlan = 
deserializeIndexPlan(metaClient.getActiveTimeline().readIndexPlanAsBytes(instant).get());
+            HoodieIndexPlan indexPlan = 
metaClient.getActiveTimeline().loadIndexPlan(instant);

Review Comment:
   Similar here for checking this API can be removed.



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/BaseTableServicePlanActionExecutor.java:
##########
@@ -171,8 +171,7 @@ public Pair<Option<HoodieInstant>, List<String>> 
fetchMissingPartitions(TableSer
           String action = tableServiceType.equals(TableServiceType.COMPACT) ? 
HoodieTimeline.COMPACTION_ACTION : HoodieTimeline.LOG_COMPACTION_ACTION;
           HoodieInstant compactionPlanInstant = new 
HoodieInstant(HoodieInstant.State.REQUESTED, action,
               instant.get().requestedTime(), 
InstantComparatorV1.REQUESTED_TIME_BASED_COMPARATOR);
-          Option<byte[]> details = 
table.getMetaClient().getActiveTimeline().readCompactionPlanAsBytes(compactionPlanInstant);
-          HoodieCompactionPlan compactionPlan = 
CompactionUtils.getCompactionPlan(table.getMetaClient(), details);
+          HoodieCompactionPlan compactionPlan = 
CompactionUtils.getCompactionPlan(table.getMetaClient(), compactionPlanInstant);

Review Comment:
   nit: see if we can get rid of `CompactionUtils.getCompactionPlan` and unify 
that into the `HoodieTimeline#loadInstantContent` method



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/clean/CleanPlanActionExecutor.java:
##########
@@ -189,18 +188,17 @@ protected Option<HoodieCleanerPlan> requestClean(String 
startCleanTime) {
     if (lastClean.isPresent()) {
       HoodieInstant cleanInstant = lastClean.get();
       HoodieActiveTimeline activeTimeline = table.getActiveTimeline();
+      HoodieInstant cleanPlanInstant = new 
HoodieInstant(HoodieInstant.State.INFLIGHT, cleanInstant.getAction(), 
cleanInstant.requestedTime(), 
InstantComparatorV1.REQUESTED_TIME_BASED_COMPARATOR);

Review Comment:
   Still keep this in `if` branch?



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