ksmou commented on code in PR #9004:
URL: https://github.com/apache/hudi/pull/9004#discussion_r1233186739


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteOperatorCoordinator.java:
##########
@@ -452,15 +444,23 @@ private void handleEndInputEvent(WriteMetadataEvent 
event) {
         
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
         // sync Hive synchronously if it is enabled in batch mode.
         syncHive();
-        // schedules the compaction plan in batch execution mode
-        if (tableState.scheduleCompaction) {
-          // if async compaction is on, schedule the compaction
-          CompactionUtil.scheduleCompaction(metaClient, writeClient, 
tableState.isDeltaTimeCompaction, true);
-        }
+        // schedules the compaction or clustering if it is enabled in batch 
execution mode
+        scheduleCompactionOrClustering(true);
       }
     }
   }
 
+  private void scheduleCompactionOrClustering(Boolean committed) {
+    // if compaction is on, schedule the compaction

Review Comment:
   +1



##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteOperatorCoordinator.java:
##########
@@ -452,15 +444,23 @@ private void handleEndInputEvent(WriteMetadataEvent 
event) {
         
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
         // sync Hive synchronously if it is enabled in batch mode.
         syncHive();
-        // schedules the compaction plan in batch execution mode
-        if (tableState.scheduleCompaction) {
-          // if async compaction is on, schedule the compaction
-          CompactionUtil.scheduleCompaction(metaClient, writeClient, 
tableState.isDeltaTimeCompaction, true);
-        }
+        // schedules the compaction or clustering if it is enabled in batch 
execution mode
+        scheduleCompactionOrClustering(true);
       }
     }
   }
 
+  private void scheduleCompactionOrClustering(Boolean committed) {
+    // if compaction is on, schedule the compaction

Review Comment:
   has changed



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