yihua commented on a change in pull request #3727:
URL: https://github.com/apache/hudi/pull/3727#discussion_r719751200



##########
File path: 
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -369,7 +372,14 @@ public void completeCompaction(
   protected List<WriteStatus> compact(String compactionInstantTime, boolean 
shouldComplete) {
     // only used for metadata table, the compaction happens in single thread
     try {
-      List<WriteStatus> writeStatuses = 
FlinkCompactHelpers.compact(compactionInstantTime, this);
+      HoodieFlinkCopyOnWriteTable flinkCopyOnWriteTable = new 
HoodieFlinkCopyOnWriteTable(
+          getConfig(), getEngineContext(), getHoodieTable().getMetaClient());
+      HoodieWriteMetadata<HoodieData<WriteStatus>> writeMetadata =
+          CompactHelpers.newInstance().compact(context, getHoodieTable(), 
flinkCopyOnWriteTable,
+              config, compactionInstantTime, this, new 
FlinkTaskContextSupplier(null));

Review comment:
       A new FlinkTaskContextSupplier instance is created in the original code. 
 Since the table already has it, I changed it to reuse the existing 
FlinkTaskContextSupplier.




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