...
No Format |
---|
$ zkcli -h kafka-zk-host1 ls /kafka-cluster/admin/ [u'reassign_partitions', u'delete_topics'] # Current pending reassignment(s) $ zkcli -h kafka-zk-host1 get /kafka-cluster/admin/reassign_partitions ('{"version":1,"partitions":[{"topic":"test_topic","partition":25,"replicas":[1,2,4],"original_replicas":[1,2,3]}]}', ZnodeStat(czxid=17180484637, mzxid=17180484641, ctime=1549498790668, mtime=1549498790680, version=1, cversion=0, aversion=0, ephemeralOwner=0, dataLength=148, numChildren=0, pzxid=17180484637)) # Cancel the pending reassignments. and remove the throttle as well. $ /usr/lib/kafka/bin/kafka-reassign-partitions.sh --zookeeper kafka-zk-host1/kafka-cluster --cancel Rolling back the current pending reassignments Map(test_topic-25 -> Map(replicas -> Buffer(1, 2, 4), original_replicas -> Buffer(1, 2, 3))) Successfully submitted cancellation of reassignments. The cancelled pending reassignments throttle was removed. Please run --verify to have the previous reassignments (not just the cancelled reassignments in progress) throttle removed. # This is just for illustration purpose. In reality, the cancellation of reassignments should be pretty quick. # The below listing of /admin might not even show cancel_reassignment_in_progress & reassign_partitions $ zkcli -h kafka-zk-host1 ls /kafka-cluster/admin/ [u'cancel_reassignment_in_progress', u'reassign_partitions', u'delete_topics'] # After reassignment cancellation is complete. The ZK node /admin/cancel_reassignment_in_progress & /admin/reassign_partitions are gone. $ zkcli -h kafka-zk-host1 ls /kafka-cluster/admin/ [u'delete_topics'] |
...