danny0405 commented on code in PR #11377:
URL: https://github.com/apache/hudi/pull/11377#discussion_r1625240199


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteOperatorCoordinator.java:
##########
@@ -272,6 +275,28 @@ public void notifyCheckpointComplete(long checkpointId) {
     );
   }
 
+  private void emitCompactionAndClusteringMetrics(Configuration conf,
+      HoodieTableMetaClient metaClient, HoodieFlinkWriteClient writeClient) {
+    if (conf.getBoolean(FlinkOptions.CLUSTERING_SCHEDULE_ENABLED)
+        && !conf.getBoolean(FlinkOptions.CLUSTERING_ASYNC_ENABLED)) {
+      HoodieTimeline pendingReplaceTimeline = metaClient.getActiveTimeline()
+          .filterPendingReplaceTimeline();
+      HoodieMetrics metrics = writeClient.getMetrics();
+      if (metrics != null) {
+        
metrics.setPendingClusteringCount(pendingReplaceTimeline.countInstants());
+      }
+    }
+    if (conf.getBoolean(FlinkOptions.COMPACTION_SCHEDULE_ENABLED)

Review Comment:
   yeah, you are right, there are two set of metrics for Flink now, we might 
need to unify them.



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