syhily commented on code in PR #21249:
URL: https://github.com/apache/flink/pull/21249#discussion_r1017120952


##########
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/enumerator/PulsarSourceEnumerator.java:
##########
@@ -96,12 +98,18 @@ public PulsarSourceEnumerator(
         this.sourceConfiguration = sourceConfiguration;
         this.context = context;
         this.splitAssigner = createAssigner(stopCursor, sourceConfiguration, 
context, enumState);
+        this.metricGroup = context.metricGroup();
     }
 
     @Override
     public void start() {
         rangeGenerator.open(sourceConfiguration);
 
+        // Expose the split assignment metrics if Flink has supported.
+        if (metricGroup != null) {
+            
metricGroup.setUnassignedSplitsGauge(splitAssigner::getUnassignedSplitCount);

Review Comment:
   Yep. Flink may add this support one day. I just add it for making sure all 
the metrics have been exposed.



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