tisonkun commented on code in PR #21249: URL: https://github.com/apache/flink/pull/21249#discussion_r1017322603
########## 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: Nope. I think it's OK with this intention. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org