merlimat closed pull request #1645: Hide namespace cli commands that are no
longer relevant
URL: https://github.com/apache/incubator-pulsar/pull/1645
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
index d40db50466..52598792e4 100644
---
a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
+++
b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
@@ -56,7 +56,7 @@ void run() throws PulsarAdminException {
}
}
- @Parameters(commandDescription = "Get the namespaces for a tenant in a
cluster")
+ @Parameters(commandDescription = "Get the namespaces for a tenant in a
cluster", hidden = true)
private class GetNamespacesPerCluster extends CliCommand {
@Parameter(description = "tenant/cluster\n", required = true)
private java.util.List<String> params;
@@ -80,6 +80,18 @@ void run() throws PulsarAdminException {
}
}
+ @Parameters(commandDescription = "Get the list of destinations for a
namespace", hidden = true)
+ private class GetDestinations extends CliCommand {
+ @Parameter(description = "tenant/namespace\n", required = true)
+ private java.util.List<String> params;
+
+ @Override
+ void run() throws PulsarAdminException {
+ String namespace = validateNamespace(params);
+ print(admin.namespaces().getTopics(namespace));
+ }
+ }
+
@Parameters(commandDescription = "Get the configuration policies of a
namspace")
private class GetPolicies extends CliCommand {
@Parameter(description = "tenant/namespace\n", required = true)
@@ -809,7 +821,8 @@ public CmdNamespaces(PulsarAdmin admin) {
jcommander.addCommand("list", new GetNamespacesPerProperty());
jcommander.addCommand("list-cluster", new GetNamespacesPerCluster());
- jcommander.addCommand("topics", new GetTopics(), "destinations");
+ jcommander.addCommand("topics", new GetTopics());
+ jcommander.addCommand("destinations", new GetDestinations());
jcommander.addCommand("policies", new GetPolicies());
jcommander.addCommand("create", new Create());
jcommander.addCommand("delete", new Delete());
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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