zhangyue19921010 commented on a change in pull request #4753:
URL: https://github.com/apache/hudi/pull/4753#discussion_r802211258
##########
File path:
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -391,16 +387,11 @@ public void completeCompaction(
}
@Override
- protected List<WriteStatus> compact(String compactionInstantTime, boolean
shouldComplete) {
+ protected HoodieWriteMetadata<List<WriteStatus>> compact(String
compactionInstantTime, boolean shouldComplete) {
// only used for metadata table, the compaction happens in single thread
- try {
- List<WriteStatus> writeStatuses =
- getHoodieTable().compact(context,
compactionInstantTime).getWriteStatuses();
- commitCompaction(compactionInstantTime, writeStatuses, Option.empty());
- return writeStatuses;
- } catch (IOException e) {
- throw new HoodieException("Error while compacting instant: " +
compactionInstantTime);
- }
+ HoodieWriteMetadata<List<WriteStatus>> compactionMetadata =
getHoodieTable().compact(context, compactionInstantTime);
+ commitCompaction(compactionInstantTime,
compactionMetadata.getCommitMetadata().get(), Option.empty());
Review comment:
Emmmm, Maybe it is set through compact runner based on
https://github.com/apache/hudi/blob/5ed35bff836f898d420e9a7ef8c47dc2ded7dca3/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/RunCompactionActionExecutor.java#L87
So we can just get it out here and no need to re-compute from rdd.
--
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]