tisonkun commented on code in PR #16251:
URL: https://github.com/apache/pulsar/pull/16251#discussion_r917763256


##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/PulsarAdminTool.java:
##########
@@ -43,121 +44,88 @@ public class PulsarAdminTool {
 
     private static int lastExitCode = Integer.MIN_VALUE;
 
-    protected final Map<String, Class<?>> commandMap;
-    private final JCommander jcommander;
+    protected Map<String, Class<?>> commandMap;
+    protected JCommander jcommander;
     protected final PulsarAdminBuilder adminBuilder;
+    protected RootParams rootParams;
 
-    @Parameter(names = { "--admin-url" }, description = "Admin Service URL to 
which to connect.")
-    String serviceUrl = null;
+    @Getter
+    public static class RootParams {
 
-    @Parameter(names = { "--auth-plugin" }, description = "Authentication 
plugin class name.")
-    String authPluginClassName = null;
+        @Parameter(names = { "--admin-url" }, description = "Admin Service URL 
to which to connect.")
+        String serviceUrl = null;
 
-    @Parameter(names = { "--request-timeout" }, description = "Request time 
out in seconds for "
-            + "the pulsar admin client for any request")
-    int requestTimeout = PulsarAdminImpl.DEFAULT_REQUEST_TIMEOUT_SECONDS;
+        @Parameter(names = { "--auth-plugin" }, description = "Authentication 
plugin class name.")
+        String authPluginClassName = null;
 
-    @Parameter(
-        names = { "--auth-params" },
-            description = "Authentication parameters, whose format is 
determined by the implementation "
-                    + "of method `configure` in authentication plugin class, 
for example \"key1:val1,key2:val2\" "
-                    + "or \"{\"key1\":\"val1\",\"key2\":\"val2\"}.")
-    String authParams = null;
+        @Parameter(names = { "--request-timeout" }, description = "Request 
time out in seconds for "
+                + "the pulsar admin client for any request")
+        int requestTimeout = PulsarAdminImpl.DEFAULT_REQUEST_TIMEOUT_SECONDS;
 
-    @Parameter(names = { "--tls-allow-insecure" }, description = "Allow TLS 
insecure connection")
-    Boolean tlsAllowInsecureConnection;
+        @Parameter(
+            names = { "--auth-params" },
+                description = "Authentication parameters, whose format is 
determined by the implementation "
+                        + "of method `configure` in authentication plugin 
class, for example \"key1:val1,key2:val2\" "
+                        + "or \"{\"key1\":\"val1\",\"key2\":\"val2\"}.")
+        String authParams = null;
 
-    @Parameter(names = { "--tls-trust-cert-path" }, description = "Allow TLS 
trust cert file path")
-    String tlsTrustCertsFilePath;
+        @Parameter(names = { "--tls-allow-insecure" }, description = "Allow 
TLS insecure connection")
+        Boolean tlsAllowInsecureConnection;
 
-    @Parameter(names = { "--tls-enable-hostname-verification" }, description = 
"Enable TLS common name verification")
-    Boolean tlsEnableHostnameVerification;
+        @Parameter(names = { "--tls-trust-cert-path" }, description = "Allow 
TLS trust cert file path")
+        String tlsTrustCertsFilePath;
 
-    @Parameter(names = { "-v", "--version" }, description = "Get version of 
pulsar admin client")
-    boolean version;
+        @Parameter(names = { "--tls-enable-hostname-verification" },
+                description = "Enable TLS common name verification")
+        Boolean tlsEnableHostnameVerification;
 
-    @Parameter(names = { "-h", "--help", }, help = true, description = "Show 
this help.")
-    boolean help;
+        @Parameter(names = { "-v", "--version" }, description = "Get version 
of pulsar admin client")
+        boolean version;
 
-    // for tls with keystore type config
-    boolean useKeyStoreTls;
-    String tlsTrustStoreType;
-    String tlsTrustStorePath;
-    String tlsTrustStorePassword;
+        @Parameter(names = { "-h", "--help", }, help = true, description = 
"Show this help.")
+        boolean help;
+    }
 
-    PulsarAdminTool(Properties properties) throws Exception {
+    public PulsarAdminTool(Properties properties) throws Exception {

Review Comment:
   Thanks for your explanation. I mistake the package path >_<
   
   P.S. I cannot resolve this conversation but it should be resolved :P



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

Reply via email to