danny0405 commented on code in PR #9617:
URL: https://github.com/apache/hudi/pull/9617#discussion_r1324243932


##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/CompactionCommand.java:
##########
@@ -195,9 +196,10 @@ public String scheduleCompact(
     HoodieTableMetaClient client = checkAndGetMetaClient();
     boolean initialized = HoodieCLI.initConf();
     HoodieCLI.initFS(initialized);
-
+    HoodieTimeGeneratorConfig timeGeneratorConfig = 
HoodieTimeGeneratorConfig.newBuilder()
+        .withPath(HoodieCLI.basePath).build();
     // First get a compaction instant time and pass it to spark launcher for 
scheduling compaction
-    String compactionInstantTime = HoodieActiveTimeline.createNewInstantTime();
+    String compactionInstantTime = 
HoodieActiveTimeline.createNewInstantTime(timeGeneratorConfig, HoodieCLI.conf);
 

Review Comment:
   Kind of think the invoke should be:
   
   `TimeGenerators.getInstance(HoodieCLI.basePath, 
HoodieCLI.conf).createNewInstantTime`
   
   or we add a new method:
   
   `HoodieActiveTimeline.createNewInstantTime(boolean shouldLock, 
HoodieTableMetaClient metaClient)`



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