Versions Compared

Key

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

...

Current stateUnder Discussion

Discussion thread: here

JIRA: here

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

...

  • Command line tools and arguments

Proposed Changes

Installation

This is an instruction how to build and start Kafka Command Line Tool (hereinafter - Shell). The implementation is in progress under KAFKA-1694.

To start Shell you need to have a running Kafka Cluster built from the given patch (attached under KAFKA-1694) and build the Shell itself.

  1. Get the code.
    Get the KAFKA-1772_1802_1775_1774_v2.patch attached to KAFKA-1694.
    The patch was built against trunk, on top of revision 7e9368b . So reset to this commit and then run to apply the patch:

    git am KAFKA-1772_1802_1775_1774_v2.patch


  2. Build the code. Run:

    ./gradlew releaseTarGz_2_10_4


  3. Start somewhere Kafka Cluster from archive under ./core/build/distributions/kafka_2.10-0.8.3-SNAPSHOT.tgz

  4. Unpack build archive and start Shell:
    #cd <kafka_home>/core/build/distributions/ && rm -rf kafka_2.10-0.8.3-SNAPSHOT && tar -xf kafka_2.10-0.8.3-SNAPSHOT.tgz

  5. Start the Shell:
    sudo <kafka_home>/core/build/distributions/kafka_2.10-0.8.3-SNAPSHOT/bin/kafka.sh --shell --broker <host : port>
    Where <host : port> is location of one of the running brokers from the Cluster.

  6. To get Shell help run:
    sudo <kafka_home>/core/build/distributions/kafka_2.10-0.8.3-SNAPSHOT/bin/kafka.sh --help

Sample usage

You can use Kafka Command Line Tool in two ways: 1) as a interactive shell 2) as a simple CLI.

E.g. to get list of topics you can:

1) Start Shell and run:

sudo bin/kafka.sh --shell --broker <host : port>

kafka> list-topics

Or

2) Run right from kafka.sh:

sudo bin/kafka.sh --list-topics --broker <host : port>


Proposed RQ/RP Format

For each type of Admin Request a separate type of Wire protocol message is created.

...