sijie commented on a change in pull request #6187: [Issue 5904]Support `unload` 
all partitions of a partitioned topic
URL: https://github.com/apache/pulsar/pull/6187#discussion_r376158936
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
 ##########
 @@ -552,6 +552,36 @@ protected ZooKeeperChildrenCache failureDomainListCache() 
{
         return pulsar().getConfigurationCache().failureDomainListCache();
     }
 
+    protected CompletableFuture<PartitionedTopicMetadata> 
getPartitionedTopicMetadataAsync(
+            TopicName topicName, boolean authoritative, boolean 
checkAllowAutoCreation) {
+        validateClusterOwnership(topicName.getCluster());
+        // validates global-namespace contains local/peer cluster: if 
peer/local cluster present then lookup can
+        // serve/redirect request else fail partitioned-metadata-request so, 
client fails while creating
+        // producer/consumer
+        validateGlobalNamespaceOwnership(topicName.getNamespaceObject());
+
+        CompletableFuture<PartitionedTopicMetadata> future = new 
CompletableFuture<>();
 
 Review comment:
   line 577 and line 579 reinitialize a completable future. so I don't think we 
need to initialize here. 

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


With regards,
Apache Git Services

Reply via email to