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 2018/04/25 21:33:33 UTC

[GitHub] merlimat closed pull request #1644: Hide CLI namespaces list-cluster and destinations commands

merlimat closed pull request #1644: Hide CLI namespaces list-cluster and destinations commands
URL: https://github.com/apache/incubator-pulsar/pull/1644
 
 
   

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..df744438c8 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,11 +56,12 @@ 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;
 
+        @SuppressWarnings("deprecation")
         @Override
         void run() throws PulsarAdminException {
             String[] parts = validatePropertyCluster(params);
@@ -80,6 +81,10 @@ void run() throws PulsarAdminException {
         }
     }
 
+    @Parameters(commandDescription = "Get the list of topics for a namespace", hidden = true)
+    private class GetDestinations extends GetTopics {
+    }
+
     @Parameters(commandDescription = "Get the configuration policies of a namspace")
     private class GetPolicies extends CliCommand {
         @Parameter(description = "tenant/namespace\n", required = true)
@@ -807,9 +812,13 @@ private static int validateTimeString(String s) {
     public CmdNamespaces(PulsarAdmin admin) {
         super("namespaces", admin);
         jcommander.addCommand("list", new GetNamespacesPerProperty());
+        // Hidden deprecated command
         jcommander.addCommand("list-cluster", new GetNamespacesPerCluster());
 
-        jcommander.addCommand("topics", new GetTopics(), "destinations");
+        jcommander.addCommand("topics", new GetTopics());
+        // Hidden deprecated listing command
+        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:
users@infra.apache.org


With regards,
Apache Git Services