hudi-agent commented on code in PR #18790:
URL: https://github.com/apache/hudi/pull/18790#discussion_r3283018814


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/BucketAssignFunction.java:
##########
@@ -145,6 +145,26 @@ public void open(Configuration parameters) throws 
Exception {
     this.recordProcessor = initRecordProcessor();
     this.metrics = new 
FlinkBucketAssignMetrics(getRuntimeContext().getMetricGroup());
     this.metrics.registerMetrics();
+    initRliShardAssignMetric();
+  }
+
+  /**
+   * Computes and registers the number of RLI shards assigned to this task 
when global RLI is active.
+   * Each task owns the file groups whose index satisfies {@code fgIndex % 
numPartitions == taskIndex}.
+   */
+  private void initRliShardAssignMetric() {

Review Comment:
   🤖 nit: the Javadoc says "Computes and registers the number of RLI shards" 
but the gauge is already registered inside `registerMetrics()` — this method 
only *sets* the gauge's value. Could you change it to "Computes and sets the 
numShardsAssigned metric value" to avoid sending future readers on a hunt for a 
registration call that isn't here?
   
   <sub><i>- AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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