You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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 Discussion

Discussion thread: here

JIRA: KAFKA-2061

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

Motivation

There is no way to know using Kafka version, but version information is important for developing client application, troubleshooting, etc.

Public Interfaces

All of commands which uses kafka-run-class.sh accepts --version and -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.

In addition to this, I think both support is helpful to find this option.
In my approach, it won't be shown up in help description, but a lot of software have version option with -version or --version.

Proposed Changes

  • 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.

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

 

  • No labels