美文网首页
kafka-preferred-replica-election

kafka-preferred-replica-election

作者: wuhuaguo丶 | 来源:发表于2020-02-20 14:05 被阅读0次

    该命令是对leader进行重新负载均衡
    用法:

    bin/kafka-preferred-replica-election.sh --zookeeper localhost:12913/kafka --path-to-json-file topicPartitionList.json

    topicPartitionList.json内容:

    {
        "partitions": [
            {
                "topic": "topic",
                "partition": 0
            },
            {
                "topic": "topic",
                "partition": 1
            },
            {
                "topic": "topic",
                "partition": 2
            },
            {
                "topic": "topic",
                "partition": 3
            },
            {
                "topic": "topic",
                "partition": 4
            },
            {
                "topic": "topic",
                "partition": 5
            },
            {
                "topic": "topic",
                "partition": 6
            },
            {
                "topic": "topic",
                "partition": 7
            }
        ]
    }
    

    在Kafka中修改Topic的preferred replica

    相关文章

      网友评论

          本文标题:kafka-preferred-replica-election

          本文链接:https://www.haomeiwen.com/subject/ylqxqhtx.html