voonhous commented on code in PR #18942:
URL: https://github.com/apache/hudi/pull/18942#discussion_r3829509916


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieTableServiceClient.java:
##########
@@ -633,7 +633,7 @@ private void completeClustering(HoodieReplaceCommitMetadata 
replaceCommitMetadat
     if (clusteringTimer != null) {
       long durationInMs = metrics.getDurationInMs(clusteringTimer.stop());
       
TimelineUtils.parseDateFromInstantTimeSafely(clusteringCommitTime).ifPresent(parsedInstant
 ->
-          metrics.updateCommitMetrics(parsedInstant.getTime(), durationInMs, 
replaceCommitMetadata, HoodieActiveTimeline.CLUSTERING_ACTION)
+          metrics.updateCommitMetrics(parsedInstant.getTime(), durationInMs, 
replaceCommitMetadata, clusteringInstant.getAction())

Review Comment:
   Closing this out, since the convention question ended up settled the other 
way.
   
   Metrics in this class are named after the table service rather than the 
completed timeline action -- compaction reports under `compaction.*` though it 
completes as `commit`, log compaction under `logcompaction.*` though it 
completes as `deltacommit` -- so `CLUSTERING_ACTION` is what matches its 
neighbours. `replacecommit.*` would also share gauges with insert_overwrite, 
delete_partition and bucket_rescale under last-write-wins registration in 
`Metrics.registerGauge`. That makes master already correct here.
   
   Both files are now byte-identical to master on this branch: `git diff 
apache/master...HEAD --stat` touches 3 files and neither 
`BaseHoodieTableServiceClient.java` nor `HoodieFlinkTableServiceClient.java` is 
among them. The PR has been repointed at the pending-instant selection bug 
instead.
   
   @nsivabalan reopen if you still want the `replacecommit` naming. That would 
need to be its own PR with a release note, since `clustering.timer` 
(`HoodieMetrics.java:166`) and `clustering.fileCreationTime` (`:456`) would 
have to move with it, and those have shipped since release-1.0.0.



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