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 2019/03/20 06:43:00 UTC
[GitHub] [pulsar] murong00 opened a new issue #3867: Provide the description
of sink/source command for better usage
murong00 opened a new issue #3867: Provide the description of sink/source command for better usage
URL: https://github.com/apache/pulsar/issues/3867
**Describe the bug**
Currently, it shows as bellow when providing zero args in command `sink` or `source`:
```
$ bin/pulsar-admin sink create
Sink archive not specfied
$ bin/pulsar-admin sink update
null
Reason: java.lang.NullPointerException: path is 'null'
$ bin/pulsar-admin sink get
java.lang.RuntimeException: You must specify a name for the sink
at org.apache.pulsar.admin.cli.CmdSinks$SinkCommand.processArguments(CmdSinks.java:488)
at org.apache.pulsar.admin.cli.CmdSinks$BaseCommand.run(CmdSinks.java:105)
at org.apache.pulsar.admin.cli.CmdBase.run(CmdBase.java:62)
at org.apache.pulsar.admin.cli.PulsarAdminTool.run(PulsarAdminTool.java:193)
at org.apache.pulsar.admin.cli.PulsarAdminTool.main(PulsarAdminTool.java:235)
```
It is better to show the description of subcommands when missing some parameters.
**Expected behavior**
```
$ bin/pulsar-admin sink get
You must specify a name for the sink
Gets the information about a Pulsar IO sink connector
Usage: get [options]
Options:
--name
The sink's name
--namespace
The sink's namespace
--tenant
The sink's tenant
$ bin/pulsar-admin sink create
Sink archive not specfied
Submit a Pulsar IO sink connector to run in a Pulsar cluster
Usage: create [options]
Options:
-a, --archive
Path to the archive file for the sink. It also supports url-path
[http/https/file (file protocol assumes that file already exists on worker host)] from
which worker can download the package.
--auto-ack
Whether or not the framework will automatically acknowleges messages
--classname
The sink's class name if archive is file-url-path (file://)
... ...
$ bin/pulsar-admin sink update
Sink archive not specfied
Update a Pulsar IO sink connector
Usage: update [options]
Options:
-a, --archive
Path to the archive file for the sink. It also supports url-path
[http/https/file (file protocol assumes that file already exists on worker host)] from
which worker can download the package.
--auto-ack
Whether or not the framework will automatically acknowleges messages
... ...
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services