danny0405 commented on code in PR #11377:
URL: https://github.com/apache/hudi/pull/11377#discussion_r1623764919
##########
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:
We already have the pending compaction instants metrics support in
https://github.com/apache/hudi/pull/9515, does that work for you?
--
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]