freeznet commented on a change in pull request #9246:
URL: https://github.com/apache/pulsar/pull/9246#discussion_r561450150



##########
File path: 
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java
##########
@@ -300,6 +304,21 @@ public String getSecret(String secretName) {
         }
     }
 
+    @Override
+    public PulsarAdmin getPulsarAdmin() {
+        return getPulsarAdmin(defaultPulsarCluster);
+    }
+
+    @Override
+    public PulsarAdmin getPulsarAdmin(String clusterName) {
+        PulsarCluster pulsarCluster = externalPulsarClusters.get(clusterName);
+        if (pulsarCluster != null) {
+            return pulsarCluster.getAdminClient();
+        } else {
+            return null;

Review comment:
       thanks for the review, will add the exception.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to