Versions Compared

Key

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

...

With work underway to migrate configuration metadata away from ZooKeeper (KIP-500), components and tools relying on direct ZK access must be updated to issue administrative calls through AK's broker via KafkaAdminClient. ConfigCommand, a tool used for describing and altering configs for various entities (topics, users, clients, brokers, and broker-loggers), is one such tool requiring update. Partial AK support has been implemented, however additional functionality is required necessary to maintain ZK-parity. This KIP proposes to relax the --zookeeper restriction on a subset of commands described belowfor all afflicted commands+flags.

In addition, the ConfigCommand tool would benefit from quality-of-life change to shorten the specifying of entities into a single flag entity specification on the command line.

Proposed Changes

...

  1. Alter an entity's config by adding/updating/removing config entries. The given entity name ma may either be a specific entity (via --entity-name) or, if supported, the default config given by the default entity for all entities (via --entity-default).
  2. Describing an entity's config. Like altering, the given entity name may either be a specific entity (via --entity-name) or, if supported, the default config given by the default entity for all entities (via --entity-default).
  3. Describing all entity configs. This happens when no identity entity identifier is provided (i.e. no --entity-name and no --entity-default omitted).

Support for the following commands is proposed to be addedWhich functions are supported, and which are proposed by this KIP (green) is as follows:

ConfigCommandZK currentAK currentAK proposed
Topics: alter specific+-+
Topics: describe specific+-+
Topics: describe all+-+
Users/clients: alter specific+-+*
Users/clients: describe specific+-+*
Users/clients: describe all+-+*

Brokers: alter specific

+++
Brokers: describe specific+++
Brokers: describe all+-+
Broker loggers: alter specific-++
Broker loggers: describe specific-++
Broker loggers: describe all--+

*AK broker-side functionality requiring future KIP

...

For the quality-of-life change, proposed is the shortening of specifying entity type and name into a single flag:

  • --entity-type <TYPES> --entity-name <NAME> can be shortened to --<TYPE>-name <NAME>
    • E.g. --entity-type topics --entity-name some-topic can be shortened to --topic-name some-topic
  • --entity-type <TYPES> --entity-default can be shortened to --<TYPE>-default
    • E.g. --entity-type brokers --entity-default can be shortened to --broker-default

Note --entity-type, --entity-name, and --entity-default will NOT be deprecated/removed.


Public Interfaces

Summary of the public interfaces proposed (all additions):. Note these are all additions, no existing commands/flags are removed or changed.

  • Support all broker descriptions for AK:
    • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type brokers <note --entity-name omitted>
  • Support all broker-logger descriptions for AK:
    • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type broker-loggers <note --entity-name omitted>
  • Support topic config commands for AK:
    • Specific topic description:
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type topics --entity-name some-topic
    • All topic descriptions:
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type topics <note --entity-name omitted>
    • Altering topic config:
      • bin/kafka-configs.sh --bootstrap-server x --alter --entity-type topics --entity-name topic <--add-config/--delete-config ...>
  • Support user/client config commands for AK:
    • Specific user/client descriptions:
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type users --entity-name some-user
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type users --entity-default
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type users --entity-name some-user --entity-type clients --entity-name some-client
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type users --entity-name some-user --entity-type clients --entity-default
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type users --entity-name default --entity-type clients --entity-name some-client
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type users --entity-name default --entity-type clients --entity-default
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type clients --entity-name some-client
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type clients --entity-default
    • All user/client descriptions:
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type users <note --entity-name omitted>
      • bin/kafka-configs.sh --bootstrap-server x --describe --entity-type clients <note --entity-name omitted>
    • Altering user/client config:
      • bin/kafka-configs.sh --bootstrap-server x --alter <same enumerations as user/client descriptions above>
  • Add abbreviation helper flags:
    • --entity-type topics --entity-name some-topic => --topic some-topic
    • --entity-type users --entity-name some-user => --user some-user
    • --entity-type users --entity-default => --user-default
    • --entity-type clients --entity-name some-client => --client some-client
    • --entity-type clients --entity-default => --client-default
    • --entity-type brokers --entity-name 10 => --broker 10
    • --entity-type brokers --entity-default => --broker-default
    • --entity-type broker-loggers --entity-name 10 => --broker-logger 10

...