yunfengzhou-hub commented on code in PR #7117:
URL: https://github.com/apache/paimon/pull/7117#discussion_r2785936168


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/ContinuousFileStoreSource.java:
##########
@@ -85,6 +94,12 @@ public SplitEnumerator<FileStoreSourceSplit, 
PendingSplitsCheckpoint> restoreEnu
         }
         StreamTableScan scan = readBuilder.newStreamScan();
         if (metricGroup(context) != null) {
+            int bucketNum = CoreOptions.fromMap(options).bucket();
+            int sourceParallelismUpperBound = bucketNum < 0 ? 
MAX_PARALLELISM_OF_SOURCE : bucketNum;
+
+            context.metricGroup()
+                    .gauge(SOURCE_PARALLELISM_UPPER_BOUND, () -> 
sourceParallelismUpperBound);

Review Comment:
   Better trigger this registration in the open() or init() method of the 
enumerator or split assigner.



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