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.
Current state: Accepted (Voting thread is here)
Discussion thread: here
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
There is no way to know using Kafka version, but version information is important for developing client application, troubleshooting, etc.
All of commands which uses kafka-run-class.sh (such as kafka-topics.sh, kafka-server-start.sh, etc) accepts --version to show version information.
This option shows Kafka version and git commit hash like below:
$ kafka-topics.sh --version
These information are gotten from AppInfoParser#getVersion and AppInfoParser#getCommitId.
- Add new class to show version information.
- Add code to kafka-run-class.sh to realize version option and run this class.
Please check this Pull Requst for details: https://github.com/apache/kafka/pull/639/files
I added some code to kafka-run-class.sh, since this is make easy to maintain each commands.
Kafka commands have each option parsers, but adding version option to each option parser makes hard to maintain when changing command and adding new one.
Compatibility, Deprecation, and Migration Plan
This proposal adds new option to each commands only, so existing users can use all commands w/o changes.
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.
- show up this option in help describe
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.