You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/02/17 14:56:25 UTC
[GitHub] [kafka] ruanwenjun opened a new pull request #11789: MINOR: Print usage in StorageTool
ruanwenjun opened a new pull request #11789:
URL: https://github.com/apache/kafka/pull/11789
* Print help in StorageTool when no args input.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ruanwenjun commented on a change in pull request #11789: MINOR: Print usage in StorageTool
Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #11789:
URL: https://github.com/apache/kafka/pull/11789#discussion_r809894308
##########
File path: core/src/main/scala/kafka/tools/StorageTool.scala
##########
@@ -56,6 +55,11 @@ object StorageTool extends Logging {
formatParser.addArgument("--ignore-formatted", "-g").
action(storeTrue())
+ if (args.length == 0 || args.contains("--help")) {
Review comment:
@dengziming Thanks for your reminder, this is a good catch.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dengziming commented on a change in pull request #11789: MINOR: Print usage in StorageTool
Posted by GitBox <gi...@apache.org>.
dengziming commented on a change in pull request #11789:
URL: https://github.com/apache/kafka/pull/11789#discussion_r809729180
##########
File path: core/src/main/scala/kafka/tools/StorageTool.scala
##########
@@ -56,6 +55,11 @@ object StorageTool extends Logging {
formatParser.addArgument("--ignore-formatted", "-g").
action(storeTrue())
+ if (args.length == 0 || args.contains("--help")) {
Review comment:
Thank you for this PR, kafka-storage.sh is using modern Argparse4J format, so we should also account for "-h" here(which is an abbreviation of --help).
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] seanli-rallyhealth commented on a change in pull request #11789: MINOR: Print usage in StorageTool
Posted by GitBox <gi...@apache.org>.
seanli-rallyhealth commented on a change in pull request #11789:
URL: https://github.com/apache/kafka/pull/11789#discussion_r809395420
##########
File path: core/src/main/scala/kafka/tools/StorageTool.scala
##########
@@ -56,6 +55,11 @@ object StorageTool extends Logging {
formatParser.addArgument("--ignore-formatted", "-g").
action(storeTrue())
+ if (args.length == 0 || args.contains("--help")) {
Review comment:
this should be first line inside try block?
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ruanwenjun commented on a change in pull request #11789: MINOR: Print usage in StorageTool
Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #11789:
URL: https://github.com/apache/kafka/pull/11789#discussion_r809624055
##########
File path: core/src/main/scala/kafka/tools/StorageTool.scala
##########
@@ -56,6 +55,11 @@ object StorageTool extends Logging {
formatParser.addArgument("--ignore-formatted", "-g").
action(storeTrue())
+ if (args.length == 0 || args.contains("--help")) {
Review comment:
@seanli-rallyhealth Maybe let it here is ok, since the above code is just create parser, it will not throw exception, and below code will begin to parse arguments.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org