Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Table of Contents

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:  [One of "Under Discussion", "Accepted", "Rejected"]

Discussion thread: here

JIRA: here

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

Motivation

Currently all the tools in Kafka we have three flavor of command line arguments:

  1. command line arguments using dot, e.g. --consumer.config
  2. command line arguments using dash --broker-list
  3. command line arguments using position 

2) #2 and 3) #3 conforms to Unix statndard standards while 1) #1 does not. We want to standardize them..

Also, some tools It would also be good if we can check whether it makes sense to change the interface so that the tools would be easier to use. e.g. mirror maker always require config files for producer and consumer even when most people might just use default settings (ex. MirrorMaker).

And finally, some tools use a unique command line argument name for a command argument (ex. VerifyConsumerRebalance uses –zk to specify ZooKeeper URL while other tools use --zookeeper).

 

Public Interfaces

The following list summarizes the flavor of each tool we have now in Kafka. The argument style are marked in parentheses using the number in previous section.

ConsoleConsumer(1 & 2)

ConsoleProducer(2)

ConsumerOffsetChecker(2)

ConsumerPerformance(2)

DumpLogSegment(2)

ExportZkOffsets(2)

GetOffsetShell(2)

ImportZkOffsets(2)

JmxTool(2)

MirrorMaker(1)

ProducerPerformance - scala (2)

ProducerPerformance - java (3)

ReplayLogProducer(2)

ReplicaVerificationTool(2)

SimpleConsumerPerformance(2)

SimpleConsumerShell(2)

StateChangeLogMerger(2)

TestEndToEndLatency(3)

TestLogCleaning(2)

UpdateOffsetsInZk(3)

VerifyConsumerRebalacne(1)

Proposed Changes

Change ConsoleConsumer, MirrorMaker, VerifyConsumerRebalance tools to use style 2).

...

Proposed Changes

  • Change all tools using argument style #2 (arguments containing dots) to argument style #3 (following Unix standard, arguments containing dashes) (details listed below).
  • (Suggested by Gwen) Since mirror maker is more like a service instead of a tool. It makes sense to pass in a mirror maker config file.
  • Change unique/one-off command line argument names to match standard argument name (details listed below).

CommandOld Argument NameNew Argument NameReason For Change
kafka-console-consumer.shconsumer.configconsumer-configNot Unix Standard
kafka-consumer-offset-checker.shsocket.timeout.mssocket-timeout-msNot Unix Standard
kafka-consumer-offset-checker.shretry.backoff.msretry-backoff-ms Not Unix Standard
ExportZkOffsets.scalazkconnectzookeeperOne-off Name
ImportZkOffsets.scalazkconnectzookeeperOne-off Name
KafkaMigrationTool.javaconsumer.configconsumer-configNot Unix Standard
KafkaMigrationTool.javaproducer.configproducer-configNot Unix Standard
KafkaMigrationTool.javanum.producersnum-producersNot Unix Standard
KafkaMigrationTool.javanum.streamsnum-streamsNot Unix Standard
KafkaMigrationTool.javaqueue.sizequeue-sizeNot Unix Standard
kafka-mirror-maker.shconsumer.configconsumer-configNot Unix Standard
kafka-mirror-maker.shproducer.configproducer-configNot Unix Standard
kafka-mirror-maker.shnum.streamsnum-streamsNot Unix Standard
kafka-producer-perf-test.shrequest-num-acksrequest-required-acksOne-off Name
kafka-replay-log-producer.shinputtopicinput-topicOne-off Name
kafka-replay-log-producer.shoutputtopicoutput-topicOne-off Name
kafka-replica-verification.shtopic-white-listwhitelistOne-off Name
kafka-replica-verification.shreport-interval-msreporting-intervalOne-off Name
kafka-simple-consumer-shell.shfetchsizefetch-sizeOne-off Name
TestLogCleaning.scalazkzookeeperOne-off Name
VerifyConsumerRebalance.scalazookeeper.connectzookeeperOne-off Name
TestLinearWriteSpeed.scalacompressioncompression-codecOne-off Name
TestOffsetManager.scalathread-countthreadsOne-off Name
TestOffsetManager.scalareporting-interval-msreporting-intervalOne-off Name

 

Note that the following additional command line argument standardizations will be tracked via KAFA-2111 but are not part of this KIP since they are less invasive:

  • Add 'help' command line argument to any top-level tool scripts that were missing it.
  • Properly format argument descriptions (into sentences) and add any missing "REQUIRED" notes.

Compatibility, Deprecation, and Migration Plan

  • What impact (if any) will there be on existing users? - Previously used command line arguments will no longer function so end-users will need to adapt their calls when upgrading Kafka.
  • If we are changing behavior how will we phase out the older behavior? - There will be no deprecation of old command line arguments, only a change-over.
  • If we need special migration tools, describe them here. - No migration tools needed but the Kafka Documentation & Wiki pages will need to be updated to educate end-users on these changes.
  • When will we remove the existing behavior? Existing behavior will change as soon as patch is committed and included in release build.

Rejected Alternatives

None