Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.

Status

Current state: Under DiscussionAccepted (Voting thread is here)

Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]

JIRA: KAFKA-2061

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

All of commands which uses kafka-run-class.sh (such as kafka-topics.sh accepts --version and , kafka-server-start.sh, etc) accepts --version to show version information.Kafka's commands has some options of single-dash (e.g. -daemon) and double-dash (e.g. --topic),
so this changes will make enable accept both option

This option shows Kafka version and git commit hash like below:

$ kafka-topics.sh --version
(snip)
2.0.0-SNAPSHOT (Commit:152c8e88cbe00c8b)

These information are gotten from AppInfoParser#getVersion and AppInfoParser#getCommitId.

Proposed Changes

  • Add new class to show version information.
  • Add code to kafka-run-class.sh to realize version option and run this class.

...

This proposal adds new option to each commands only, so existing users can use all commands w/o changes.

Rejected Alternatives

Adding version option to each command parsers

Kafka's commands have option parser for each. This approach is to update each option parser.
For adding this option to kafka-topic.sh, we should modify TopicCommandOptions class, for example.

Pros

  • show up this option in help describe

Cons

  • need to maintain individually for this option when anyone add and update commands

This problem may be solved by KIP-14 (Tools Standardization).
Some code will be added to kafka-run-class.sh only to add this option in this KIP. It makes easy to adapt KIP-14 because mount of code to be changed is small.
(That this code is only temporary before accepted KIP-14)

Support both single-dash and double-dash option for this option

This means users can use --version and -version to show version information. Both support makes easy to find this option. 

However, tools standardization is under considering in KIP-14 now, and this option may be included.
We considered that it is too hard to keep maintain to support both --version and -version after accepted KIP-14.

 none