You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/07 06:20:49 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #13796: [PIP-143] Support split bundle by specified boundaries

codelipenghui commented on a change in pull request #13796:
URL: https://github.com/apache/pulsar/pull/13796#discussion_r820404953



##########
File path: pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
##########
@@ -892,7 +897,41 @@ void run() throws PulsarAdminException {
                 throw new ParameterException("--bundle and --bundle-type are mutually exclusive");
             }
             bundle = bundleType != null ? bundleType.toString() : bundle;
-            getAdmin().namespaces().splitNamespaceBundle(namespace, bundle, unload, splitAlgorithmName);
+            if (splitBoundaries == null || splitBoundaries.size() == 0) {
+                getAdmin().namespaces().splitNamespaceBundle(
+                        namespace, bundle, unload, splitAlgorithmName);
+            } else {
+                getAdmin().namespaces().splitNamespaceBundle(
+                        namespace, bundle, unload, splitAlgorithmName, splitBoundaries);
+            }
+        }
+    }
+
+    @Parameters(commandDescription = "Get the positions for one or more topic(s) in a namespace bundle")
+    private class GetTopicHashPositions extends CliCommand {
+        @Parameter(description = "tenant/namespace", required = true)
+        private java.util.List<String> params;
+
+        @Parameter(
+                names = { "--bundle", "-b" },
+                description = "{start-boundary}_{end-boundary} format namespace bundle",
+                required = false)
+        private String bundle;
+
+        @Parameter(
+                names = { "--topic-list",  "-tl" },

Review comment:
       ```suggestion
                   names = { "--topics",  "-t" },
   ```




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org