lokeshj1703 opened a new pull request, #19644: URL: https://github.com/apache/hudi/pull/19644
### Describe the issue this Pull Request addresses Replaces #18942, which was opened from a fork that cannot take pushes; original work by @rahil-c. `BaseHoodieTableServiceClient#completeClustering` recorded clustering commit metrics under a hardcoded `HoodieActiveTimeline.CLUSTERING_ACTION`. Clustering instants carry different actions by table version: `REPLACE_COMMIT_ACTION` on 0.x and `CLUSTERING_ACTION` on 1.x. On 0.x tables the metrics therefore landed under the wrong namespace. ### Summary and Changelog Use the instant's own action when recording clustering commit metrics, so the metric namespace matches the table version. - `BaseHoodieTableServiceClient#completeClustering`: pass `clusteringInstant.getAction()` instead of the hardcoded `CLUSTERING_ACTION`. - `HoodieFlinkTableServiceClient#completeClustering`: the same fix on the Flink path. - `TestHoodieMetrics#testClusteringCommitMetricsUsesVersionAwareAction`: asserts metrics land under `clustering.*` for `CLUSTERING_ACTION` (1.x) and under `replacecommit.*` for `REPLACE_COMMIT_ACTION` (0.x). ### Impact Clustering commit metrics are emitted under the correct action namespace on both 0.x and 1.x tables. No public API change. ### Risk Level low. Localized metrics-labeling fix with a new unit test covering both table-version actions. ### Documentation Update none ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [ ] Enough context is provided in the sections above - [ ] Adequate tests were added if applicable -- 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]
