/usr/local/kafka/bin/kafka-topics.sh --alter --zookeeper 10.1.1.1:2181/kafka --topic hogtmoperation --partitions 5
/usr/local/kafka/bin/kafka-reassign-partitions.sh -zookeeper 10.1.1.1:2181/kafka --reassignment-json-file /root/replication.json --execute
其中/root/replication.json文件如下:
{
"version": 1,
"partitions": [
{
"topic": "hogtmoperation",
"partition": 0,
"replicas": [
2,
1
]
},
{
"topic": "hogtmoperation",
"partition": 1,
"replicas": [
3,
2
]
},
{
"topic": "hogtmoperation",
"partition": 2,
"replicas": [
4,
3
]
},
{
"topic": "hogtmoperation",
"partition": 3,
"replicas": [
5,
4
]
},
{
"topic": "hogtmoperation",
"partition": 4,
"replicas": [
6,
5
]
}
]
}
Thu Feb 21 16:56:13 CST 2019
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)