[jira] [Commented] (KAFKA-2111) Command Line Standardization - Add Help Arguments & List Required Fields

2024-04-22 Thread Walter Hernandez (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-2111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17839609#comment-17839609
 ] 

Walter Hernandez commented on KAFKA-2111:
-

*[mimaison|https://github.com/mimaison]* commented [on Feb 
20|https://github.com/apache/kafka/pull/3605#issuecomment-1954006952]
|This PR is very old and the tools are being rewritten in Java, so I'll close 
this PR.|

The above was comment on the linked PR for this ticket, where they're indeed 
written in Java.

In addition, the referenced KIP hasn't seen an update since 2015.

I believe it's safe to close this ticket for cleanup.

> Command Line Standardization - Add Help Arguments & List Required Fields
> 
>
> Key: KAFKA-2111
> URL: https://issues.apache.org/jira/browse/KAFKA-2111
> Project: Kafka
>  Issue Type: Improvement
>  Components: admin
>Reporter: Matt Warhaftig
>Priority: Minor
>  Labels: newbie
>
> KIP-14 is the standardization of tool command line arguments.  As an offshoot 
> of that proposal there are standardization changes that don't need to be part 
> of the KIP since they are less invasive.  They are:
> - Properly format argument descriptions (into sentences) and add any missing 
> "REQUIRED" notes.
> - Add 'help' argument to any top-level tool scripts that were missing it.
> This JIRA is for tracking them.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (KAFKA-2111) Command Line Standardization - Add Help Arguments & List Required Fields

2017-08-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-2111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16108936#comment-16108936
 ] 

ASF GitHub Bot commented on KAFKA-2111:
---

GitHub user johnma14 opened a pull request:

https://github.com/apache/kafka/pull/3605

KAFKA-2111: Add help arguments and required fields

This patch addresses the less invasive standardization of command
line arguments as an offshoot of KIP-14. The following changes have
been addressed in this patchset:
- Used the required() method of JOptSimple to identify required options
  for commands. Currently, an option is identified as required by
  mentioning the word REQUIRED in the description of the option.
- Used the requiredIf() and requiredUnless() methods to capture option
  requirements which met the condition - required if/unless some other
  option is present
- Removed calls to CommandLineUtils.checkRequiredArgs(). Since we use
  JOptSimple's required() function to mark options as required, when
  we parse the arguments using OptionParser, it automatically checks
  the required arguments in that call. So there is no need to do this
  check again externally.
- Added a help option to all the commands that were missing it. For
  some of the commands that had the help option, included the call to
  forHelp() method to mark the option as a help option. This means that
  specifying help option on the command line will not cause parsing to
  fail because of missing required options.
- Added try-catch statements to correctly capture OptionException. In
  the case an OptionException is caught, the command usage information
  will be printed along with the exception message. The stacktrace for
  all other exceptions will be printed to System.err. This addresses
  the issue in KAFKA-4220
- Made some minor changes to the description text and added some more
  description for some of the options

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/johnma14/kafka bug/KAFKA-2111

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/kafka/pull/3605.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3605


commit 97061e37a2f4f4b32fb4353d0e4d8590020225c2
Author: johnma14 
Date:   2017-06-27T23:11:46Z

KAFKA-2111: Add help arguments and required fields

This patch addresses the less invasive standardization of command
line arguments as an offshoot of KIP-14. The following changes have
been addressed in this patchset:
- Used the required() method of JOptSimple to identify required options
  for commands. Currently, an option is identified as required by
  mentioning the word REQUIRED in the description of the option.
- Used the requiredIf() and requiredUnless() methods to capture option
  requirements which met the condition - required if/unless some other
  option is present
- Removed calls to CommandLineUtils.checkRequiredArgs(). Since we use
  JOptSimple's required() function to mark options as required, when
  we parse the arguments using OptionParser, it automatically checks
  the required arguments in that call. So there is no need to do this
  check again externally.
- Added a help option to all the commands that were missing it. For
  some of the commands that had the help option, included the call to
  forHelp() method to mark the option as a help option. This means that
  specifying help option on the command line will not cause parsing to
  fail because of missing required options.
- Added try-catch statements to correctly capture OptionException. In
  the case an OptionException is caught, the command usage information
  will be printed along with the exception message. The stacktrace for
  all other exceptions will be printed to System.err. This addresses
  the issue in KAFKA-4220
- Made some minor changes to the description text and added some more
  description for some of the options




> Command Line Standardization - Add Help Arguments & List Required Fields
> 
>
> Key: KAFKA-2111
> URL: https://issues.apache.org/jira/browse/KAFKA-2111
> Project: Kafka
>  Issue Type: Improvement
>  Components: admin
>Reporter: Matt Warhaftig
>Assignee: Mariam John
>Priority: Minor
>  Labels: newbie
>
> KIP-14 is the standardization of tool command line arguments.  As an offshoot 
> of that proposal there are standardization changes that don't need to be part 
> of 

[jira] [Commented] (KAFKA-2111) Command Line Standardization - Add Help Arguments & List Required Fields

2017-06-16 Thread Mariam John (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-2111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16052033#comment-16052033
 ] 

Mariam John commented on KAFKA-2111:


Hi Tom,

  I am sorry I just saw this message right now. I am currently working on this 
and almost done with the changes. It does not contain all the recommendations 
you had mentioned in your mail. I will try to put out a patch today. 

> Command Line Standardization - Add Help Arguments & List Required Fields
> 
>
> Key: KAFKA-2111
> URL: https://issues.apache.org/jira/browse/KAFKA-2111
> Project: Kafka
>  Issue Type: Improvement
>  Components: admin
>Reporter: Matt Warhaftig
>Assignee: Mariam John
>Priority: Minor
>  Labels: newbie
>
> KIP-14 is the standardization of tool command line arguments.  As an offshoot 
> of that proposal there are standardization changes that don't need to be part 
> of the KIP since they are less invasive.  They are:
> - Properly format argument descriptions (into sentences) and add any missing 
> "REQUIRED" notes.
> - Add 'help' argument to any top-level tool scripts that were missing it.
> This JIRA is for tracking them.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)