Skip to content

Commit

Permalink
improvement doc of --auth-params in pulsar-client cli (apache#3605)
Browse files Browse the repository at this point in the history
### Motivation

User report documentation is not very clear for pulsar-client command `--auth-params` parameter.
for org.apache.pulsar.client.impl.auth.AuthenticationBasic, it is in Json format


### Modifications

fix doc
  • Loading branch information
jiazhai authored and sijie committed Feb 22, 2019
1 parent e9ba7ac commit d0edfe4
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ public class PulsarAdminTool {
@Parameter(names = { "--auth-plugin" }, description = "Authentication plugin class name.")
String authPluginClassName = null;

@Parameter(names = { "--auth-params" }, description = "Authentication parameters, e.g., \"key1:val1,key2:val2\".")
@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-allow-insecure" }, description = "Allow TLS insecure connection")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ public class PulsarClientTool {
@Parameter(names = { "--auth-plugin" }, description = "Authentication plugin class name.")
String authPluginClassName = null;

@Parameter(names = { "--auth-params" }, description = "Authentication parameters, e.g., \"key1:val1,key2:val2\".")
@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 = { "-h", "--help", }, help = true, description = "Show this help.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ static class Arguments {
@Parameter(names = { "--auth_plugin" }, description = "Authentication plugin class name")
public String authPluginClassName;

@Parameter(names = {
"--auth_params" }, description = "Authentication parameters, e.g., \"key1:val1,key2:val2\"")
@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\"}.")
public String authParams;

@Parameter(names = { "-m",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ static class Arguments {
@Parameter(names = { "--auth_plugin" }, description = "Authentication plugin class name")
public String authPluginClassName;

@Parameter(names = {
"--auth_params" }, description = "Authentication parameters, e.g., \"key1:val1,key2:val2\"")
@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\"}.")
public String authParams;

@Parameter(names = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ static class Arguments {
@Parameter(names = { "--auth_plugin" }, description = "Authentication plugin class name")
public String authPluginClassName;

@Parameter(names = {
"--auth_params" }, description = "Authentication parameters, e.g., \"key1:val1,key2:val2\"")
@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\"}.")
public String authParams;

@Parameter(names = { "-o", "--max-outstanding" }, description = "Max number of outstanding messages")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@ static class Arguments {
@Parameter(names = { "--auth-plugin" }, description = "Authentication plugin class name")
public String authPluginClassName;

@Parameter(names = {
"--auth-params" }, description = "Authentication parameters, e.g., \"key1:val1,key2:val2\"")
@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\"}.")
public String authParams;

@Parameter(names = {
Expand Down
2 changes: 1 addition & 1 deletion site2/docs/reference-cli-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ Commands
Options
|Flag|Description|Default|
|---|---|---|
|`--auth-params`|Authentication parameters, for example key1:val1,key2:val2||
|`--auth-params`|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\"}"||
|`--auth-plugin`|Authentication plugin class name||
|`--url`|Broker URL to which to connect|pulsar://localhost:6650/|

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ Commands
Options
|Flag|Description|Default|
|---|---|---|
|`--auth-params`|Authentication parameters, for example key1:val1,key2:val2||
|`--auth-params`|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\"}" ||
|`--auth-plugin`|Authentication plugin class name||
|`--url`|Broker URL to which to connect|pulsar://localhost:6650/|

Expand Down

0 comments on commit d0edfe4

Please sign in to comment.