yanshuchong opened a new issue #8700:
URL: https://github.com/apache/pulsar/issues/8700


   1、init code with one ip of cluster
          PulsarAdminBuilder pulsarAdminBuilder = 
PulsarAdmin.builder().serviceHttpUrl("http://host-10-33-50-144:8080";);
   2、getActiveBrokers and getOwnedNamespaces
           List<String> brokers = 
adminClient.brokers().getActiveBrokers("pulsar-cluster-1");
           System.out.println("current brokers : " + brokers);
           for (String brokerUrl : brokers) {
               System.out.println("current broker : " + brokerUrl + "-->"
                   + 
adminClient.brokers().getOwnedNamespaces("pulsar-cluster-1", brokerUrl));
           }
   
   current brokers : [host-10-33-50-144:8080, host-10-33-50-71:8080, 
host-10-33-50-88:8080]
   current broker : 
host-10-33-50-144:8080-->{pulsar/pulsar-cluster-1/host-10-33-50-144:8080/0x00000000_0xffffffff=[broker_assignment=shared
 is_controlled=false is_active=true]}
   Exception in thread "main" 
org.apache.pulsar.client.admin.PulsarAdminException$NotAuthorizedException: 
HTTP 401 Unauthorized
   
   
   doubt:can not getOwnedNamespaces if admin builder serviceHttpUrl host not 
the same with brokerUrl
                 https://github.com/apache/pulsar/issues/8684 SASL 
improvement:config serviceHttpUrl with ip
   
   should i need to create 3 PulsarAdmin instance to query 3  serevr's  
   
   
   
   


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