LXin96 commented on code in PR #10420:
URL: https://github.com/apache/hudi/pull/10420#discussion_r1439126337


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/clustering/ClusteringPlanOperator.java:
##########
@@ -88,10 +97,20 @@ public void notifyCheckpointComplete(long checkpointId) {
   }
 
   private void scheduleClustering(HoodieFlinkTable<?> table, long 
checkpointId) {
+    List<HoodieInstant> pendingClusteringInstantTimes =
+        
ClusteringUtils.getPendingClusteringInstantTimes(table.getMetaClient());
     // the first instant takes the highest priority.
     Option<HoodieInstant> firstRequested = Option.fromJavaOptional(
-        
ClusteringUtils.getPendingClusteringInstantTimes(table.getMetaClient()).stream()
+        pendingClusteringInstantTimes.stream()
             .filter(instant -> instant.getState() == 
HoodieInstant.State.REQUESTED).findFirst());
+
+    long pendingClusteringCount = pendingClusteringInstantTimes.stream()
+        .filter(instant -> instant.getState() == 
State.REQUESTED).collect(Collectors.toList()).size();

Review Comment:
   ok



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