kafka 副本和分区改怎么设置,4个kafka结点,topic有4个副本

这两种那种比较合理,我是倾向于第一种

{
    "version": 1,
    "partitions": [{
        "topic": "deploycontrol",
        "partition": 3,
        "replicas": [0, 1, 2]
    }, {
        "topic": "deploycontrol",
        "partition": 2,
        "replicas": [1, 3, 4]
    }, {
        "topic": "deploycontrol",
        "partition": 0,
        "replicas": [1, 2, 3]
    }, {
        "topic": "deploycontrol",
        "partition": 1,
        "replicas": [0, 2, 3]
    }]
}
{
    "version": 1,
    "partitions": [{
        "topic": "deploycontrol",
        "partition": 3,
        "replicas": [3, 4, 1]
    }, {
        "topic": "deploycontrol",
        "partition": 2,
        "replicas": [2, 3, 4]
    }, {
        "topic": "deploycontrol",
        "partition": 0,
        "replicas": [4, 1, 2]
    }, {
        "topic": "deploycontrol",
        "partition": 1,
        "replicas": [1, 2, 3]
    }]
}





发表于: 2月前   最后更新时间: 2月前   游览量:470
上一条: 到头了!
下一条: 已经是最后了!

  • 写错了,是三个副本
    • 重新分贝分区 时提示 ERROR:Assigned replicas (2,3,1)don't match the list of replicas for reassignment (4,1,2),
      reassignment of partition [topic ,0] faild 这个有什么后果,会不会出大事