yihua commented on code in PR #12390:
URL: https://github.com/apache/hudi/pull/12390#discussion_r1869202358
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/HoodieCompactor.java:
##########
@@ -261,6 +287,50 @@ public List<WriteStatus> compact(HoodieCompactionHandler
compactionHandler,
}).collect(toList());
}
+ /**
+ * Execute a single compaction operation and report back status.
+ */
+ public List<WriteStatus> compact(HoodieCompactionHandler compactionHandler,
+ HoodieTableMetaClient metaClient,
+ HoodieWriteConfig config,
+ CompactionOperation operation,
+ String instantTime,
+ String maxInstantTime,
+ Option<InstantRange> instantRange,
+ TaskContextSupplier taskContextSupplier,
+ CompactionExecutionHelper executionHelper,
+ Option<EngineBroadcastManager>
broadcastManagerOpt) throws IOException {
+ List<WriteStatus> writeStatusList =
compactionHandler.runCompactionUsingFileGroupReader(instantTime,
+ operation,
broadcastManagerOpt.get().retrieveFileGroupReaderContext(metaClient.getBasePath()).get(),
+ broadcastManagerOpt.get().retrieveStorageConfig().get());
+ writeStatusList
+ .forEach(s -> {
+ final HoodieWriteStat stat = s.getStat();
+ /*
+ fill in log reading stats
+
stat.setTotalUpdatedRecordsCompacted(scanner.getNumMergedRecordsInLog());
Review Comment:
Removed and the log reader stats functionality is now in the file group
reader.
--
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]