Versions Compared

Key

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

...

Code Block
languagetext
titleExample usage with file
bin/kafka-configs.sh --bootstrap-server localhost:9092 \
  --entity-type brokers --entity-default \
  --alter --add-config-file new.properties

...

Code Block
languagetext
bin/kafka-configs.sh --bootstrap-server localhost:9092 \
  --entity-type brokers --entity-default \
  --alter --add-config 'k1={"key1":"val1","key2":"val2"},k2=[[1,2],[3,4]]'

...

Code Block
languagetext
bin/kafka-configs.sh --bootstrap-server localhost:9092 \
  --entity-type brokers --entity-default \
  --alter \
  --add-config k1=v1 \
  --add-config k2=v1,v2,v3 \
  --add-config k3=v3 \
  --add-config 'k4={"key1": "val1", "key2": "val2"}' \
  --add-config 'k5=[[1,2],[3,4]]'

...

Expand
titleRejected Alternative

Input from STDIN can be used instead of a file on disk, to do this use a hyphen instead of a file path:

Code Block
languagetext
titleExample usage with STDIN
grep 'complex.property' server.properties | bin/kafka-configs.sh --bootstrap-server localhost:9092 \
  --entity-type brokers --entity-default \
  --alter --add-config-file -


...

Expand
titleRejected Alternative

So that the add and delete usages are parallel, we will also add an option to accept a properties file and delete the properties from the file. Any property defined in the file will be deleted, regardless of what value is defined in the file.

Code Block
languagetext
titleExample usage with file
bin/kafka-configs.sh --bootstrap-server localhost:9092 \
  --entity-type brokers --entity-default \
  --alter --delete-config-file old.properties

Input from STDIN can be used instead of a file on disk, to do this use a hyphen instead of a file path:

Code Block
languagetext
titleExample usage with STDIN
grep 'complex.property' server.properties | bin/kafka-configs.sh --bootstrap-server localhost:9092 \
  --entity-type brokers --entity-default \
  --alter --delete-config-file -

...

We will add the --delete-config-file option to kafka-configs.sh. It will not be mutually exclusive with --delete-config because there is no ambiguity about precedence.

...