leizhiyuan commented on a change in pull request #13164:
URL: https://github.com/apache/pulsar/pull/13164#discussion_r763878473
##########
File path:
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/resources/NamespaceResources.java
##########
@@ -296,4 +297,39 @@ public boolean partitionedTopicExists(TopicName tn) throws
MetadataStoreExceptio
return future;
}
}
+
+ // clear resource of `/loadbalance/bundle-data/{tenant}/{namespace}/` for
zk-node
+ public CompletableFuture<Void> deleteBundleDataAsync(NamespaceName ns) {
+ final String namespaceBundlePath = joinPath(BUNDLE_DATA_BASE_PATH,
ns.toString());
+ CompletableFuture<Void> future = new CompletableFuture<Void>();
+ deleteRecursiveAsync(this, namespaceBundlePath).whenComplete((ignore,
ex) -> {
+ if (ex != null && ex.getCause() instanceof
KeeperException.NoNodeException) {
+ future.complete(null);
+ } else if (ex != null) {
+ future.completeExceptionally(ex);
+ } else {
+ future.complete(null);
+ }
+ });
+
+ return future;
+ }
+
+ // clear resource of `/loadbalance/bundle-data/{tenant}/` for zk-node
+ public CompletableFuture<Void> deleteBundleDataTenantAsync(String tenant) {
+ final String namespaceBundlePath = joinPath(BUNDLE_DATA_BASE_PATH,
tenant);
Review comment:
ok
--
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]