Versions Compared

Key

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

...

Notes:
- Broker will cancel existing movement of the replica if "any" is specified as destination log directory.
- If broker doesn't not have already replica created for the specified topicParition when it receives ChangeReplicaDirRequest, it will reply ReplicaNotAvailableException AND remember (replica, destination log directory) pair in memory to create the replica in the specified log directory  when it receives LeaderAndIsrRequest later.

View file
nameJBOD-flowgraph.pdf
height250

...

- User specifies a list of log directories, one log directory per replica, for each topic partition in the reassignment json file that is provided to kafka-reassignment-partitions.shThe log directory specified by user must be either "any", or absolute path which begins with '/'. See Scripts section for the format of this json file.
- In addition to creating znode at /admin/reassign_partitions with the replica assignment, the script will also send ChangeReplicaDirRequest to the brokers of those replicas whose log directory path in the assignment is not "any". The script needs to retry up to a configured amount of time if ChangeReplicaDirResponse shows ReplicaNotAvailableException. This is needed to wait for controller to send LeaderAndIsrRequest to the broker to create the replica if the broker isn't already a leader or follower of the partition.
- Broker handles ChangeReplicaDirRequest as The script sends ChangeReplicaDirRequest to those brokers which need to move replicas to user-specified log directory. This step can be skipped if user has specified "any" as log directory for all replicas. The script quits with error if the broker to receive ChangeReplicaDirRequest is offline.
- The script waits for ChangeReplicaDirResponse. Broker handles ChangeReplicaDirRequest as specified in the section "How to move replica between log directories on the same broker".
- The script creates reassignment znode in zookeeper.
- The script retries ChangeReplicaDirRequest to those brokers which have responded with unsuccessful ChangeReplicaDirResponse previously. The script keeps retrying up to user-specified timeout. The timeout is 10 seconds by default. The script quits with error if the broker to receive ChangeReplicaDirRequest is offline.
- The script returns result to user.

Here are the steps to verify partition assignment:

...