Versions Compared

Key

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

Table of Contents

Status

Current stateVotingAccepted

Discussion thread: https://lists.apache.org/thread/mwcljxdnyobthsszy4n2qr2tqcf9cxcf

...

The new script will accept an optional parameter [--process-role=value], with the value indicating whether to kill Kafka broker processes or controller processes.

...

The new script will accept an optional parameter [--node-id=value], with the value indicating the specific process, identified by its node id, that the user wishes to kill.

...

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

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

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

If both parameters are provided, the value for node-id parameter will take precedence, i.e, the process with node id specified will be killed, no matter what's the process role provided. Also, a log message will be shown to indicate that precedence. 

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

...

I'm changing the "kafka-server-stop.sh" file to accept an optional field, either "process-role" or "node-id". When the user 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.NOTE: If users want to use the feature, they have to provide an absolute path to the configuration file when starting a Kafka controller/broker process. 

Compatibility, Deprecation, and Migration Plan

...