Versions Compared

Key

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

...

You can cordon /tmp/kraft-broker0-logs0 using:
$ bin/kafka-configs.sh --bootstrap-server localhost:9092 --alter --add-config cordoned.log.dirs=/tmp/kraft-broker0-logs0 --entity-type brokers --entity-name 0

When the configuration is set on a broker, the broker will include the Uuids of cordoned log directories when it registers to the controller and also include them in each heartbeat request it sends to the controller to reflect potential dynamic updates.

The controller uses the ClusterDescriber interface to let the replica placer determine the usable brokers and the default log directory partitions should be placed on. This interface has 2 methods whose behavior will be updated:
- usableBrokers(): This method will only return brokers that have log directories not cordoned.
- defaultDir(): This method will not return the Uuid of a log directory that is cordoned.

...

This KIP proposes adding a new broker configuration:

Name: cordoned.log.dirs.
Documentation: A comma-separated list of the directories that are cordoned. Entries in this list must be entries in log.dirs or log.dir configuration.
Type: string
Default: empty string
Importance: low
Update Mode: per-broker

...