Versions Compared

Key

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

...

The command line for stopping Kafka nodes will include a new optional parameter pair of optional and mutually exclusive parameters "[--process-role = value]" OR "[--requirednode-config <nameid = value>value]" to  to support identifying a specific process to stop based on the contents of the node's configuration file.

...

The new script will accept an optional parameter "[--required-config <name=value>process-role]", with name indicating any fields in the configuration file, to indicate that the script should only kill Kafka processes that are running with that value for the config field.the value indicating killing either Kafka broker processes or controller processes.

OR

The new script will accept an optional parameter "[--node-id]", with the value indicating the node id of the specific process the user wish to kill. 

Example 1: the new command to kill all the broker processes will look like:

Code Block
./bin/kafka-server-stop.sh --required-config process.rolesprocess-role=broker

Example 2: the command to kill the process with node ID = 1 will look like:

Code Block
./bin/kafka-server-stop.sh --requirednode-config node.id=1

When neither a "process-role" nor a "requirednode-configid" field is not provided, the behavior remains unchanged -- all Kafka processes are stopped.

...

I'm changing the "kafka-server-stop.sh" file to accept an optional field, required-config either "process-role" or "node-id". When the user specify a "name"(a specific field in the configuration file)specifies a process role or a node id, I will retrieve the absolute path to the configuration file, and search for the value of that field. If the value retrieved from the configuration file matches the input, that process will be killed, otherwise it will be skipped.

...

Existing users won't need to change any behavior if they want to continue killing both controller and broker processes. Otherwise, if they want to kill only the broker/controller, or an individual broker/controller, they'll need to specify a "requiredprocess-configrole" field with "<name = value>" or a "node-id" field in the script.

Test Plan

The change can be tested through command line. 

...