stream2000 commented on code in PR #10420:
URL: https://github.com/apache/hudi/pull/10420#discussion_r1439252905
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/clustering/ClusteringPlanOperator.java:
##########
@@ -88,10 +96,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()
Review Comment:
Why do we only include requested instants? Will inflight and requested
instants be double-counted? If that's the case, we should also correct the
method
`org.apache.hudi.metrics.FlinkCompactionMetrics#setPendingCompactionCount`.
--
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]