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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metrics/HoodieMetrics.java:
##########
@@ -456,8 +459,12 @@ public void updateClusteringFileCreationMetrics(long 
durationInMs) {
     reportMetrics(HoodieTimeline.CLUSTERING_ACTION, "fileCreationTime", 
durationInMs);
   }
 
-  public void updateTableServiceInstantMetrics(final HoodieActiveTimeline 
activeTimeline) {
-    updateEarliestPendingInstant(activeTimeline, 
EARLIEST_PENDING_CLUSTERING_INSTANT_STR, HoodieTimeline.CLUSTERING_ACTION);
+  public void updateTableServiceInstantMetrics(final HoodieActiveTimeline 
activeTimeline, final InstantGenerator instantGenerator) {
+    // Clustering is scheduled as CLUSTERING_ACTION only on timeline layout 2. 
On table version six it is scheduled as
+    // REPLACE_COMMIT_ACTION, which insert_overwrite and delete_partition 
share, so the clustering plan is what
+    // identifies it rather than the action name.

Review Comment:
   The javadoc at the head is right, but the body was not updated. Summary 
still says pending clustering is selected "by whether they carry a clustering 
plan, via the existing `ClusteringUtils.isClusteringInstant`", and its three 
bullets plus the Impact line ("gains a parameter") describe the 
`InstantGenerator` / `Predicate` / `BaseHoodieWriteClient` revision that 
488a1e6 removed.
   
   Two notes from the last round are also still in the body: the metric is 
`clustering.earliestInflightClusteringInstant` (`HoodieMetrics.java:77`), not 
`earliestPendingClusteringInstant`, and `latestCompletedClusteringInstant` is 
still action-name-based at `:468`, so "the completed counterpart ... is 
correct" overstates it. Could we rewrite Summary and Impact around 
`filterPendingClusteringTimeline()` and fix those two?
   



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