kafka工具
replication tool工作步骤(异步过程,执行完1就结束):
1.更新zk上的/admin/preferred_replica_election节点,内容为副本的几个位置(不包含已经奔溃的leader)
2.controller中的zk的listener读取topic partition的副本的几个位置
3.controller获取每个topic partition的副本的几个replica中的第一个,作为referred replica;
如果这个preferred replica不是leader且在isr中,则controller发出request到这个preferred replica的broker,通知其作为topic partition的leader
bin/kafka-preferred-replica-election.sh --zookeeper localhost:81821/kafka-zk --path-to-json-file topicPartitionList.json
topicPartitionList.json格式为:
{
"partitions":
[
{"topic": "topic1", "partition": "0"},
{"topic": "topic1", "partition": "1"},
{"topic": "topic1", "partition": "2"},
{"topic": "topic2", "partition": "0"},
{"topic": "topic2", "partition": "1"},
]
}
FAQ
What happens if the preferred replica is not in the ISR?
The controller will fail to move the leadership to the preferred replica if it is not in the ISR. This is to ensure that there is no dataloss. When the replica becomes "in-sync" with the leader, the tool can be run again to move the leader.
则移动失败,避免数据丢失
How to find if all the partitions have been moved to the "preferred replica" after running the tool?
ListTopicCommand is an excellent tool that provides an overview of all the topic partitions in the cluster. For each topic partition, it displays the leader, assigned replicas and current "in-sync" replica set. If the leader and the first replica in the assigned replica set are the same then the Preferred replica leader election" tool succeeded. If not, the tool failed and may have to be run again.
跟isr的第一个replica相同
相关推荐
kafka tools,里面包含使用教程。一个可视化的kafka消费和topic结构工具,非常好用,推荐给大家。
GetOffsetShell_kafka_SSL 在具有SSL的kafka kafka.tools.GetOffsetShell中启用SSL身份验证时,GetOffsetShell的解决方案不起作用
kafkatool客户端工具,查询kafka中的信息。
java运行依赖jar包
kafka的开源客户端连接工具,简单易用,业内公认好用。使用教程网上众多,方便快速入门,使用门槛低,kafka的开源客户端连接工,kafka的开源客户端连接工,kafka的开源客户端连接工,kafka的开源客户端连接工
Kafka是由Apache软件基金会开发的一个开源流处理平台,由Scala和Java编写。Kafka是一种高吞吐量的分布式发布订阅消息系统,它可以处理消费者规模的网站中的所有动作流数据。
kafka-connect-tools
Chapter 7, Operationalizing Kafka, describes information about the Kafka tools required for cluster administration and cluster mirroring and also shares information about how to integrate Kafka with ...
kafka kafka kafka kafka kafka
方便查看kafka相关信息。比如brokers、topic、consumers;支持右键删除topic的功能(不过我没有这么玩过,我使用的命令)
KafkaTool_2.0.7 dmg + 64bit-exe [For Kafka version 0.11 and later]
kafka
kafka tools 工具,简单好用 mac 版本
kafkatool 国内可能下载不了,搞32 64位的都压缩在一起了Kafka Tool 2.0.7( 32\64) To download the Kafka UI Tool for your operating system, use the links below. All versions of Kafka Tool come with a ...
kafka连接工具
kafka小工具,支持查看kafka消息,消费者和topic,并且支持不同的序列化方式
kafka kafka kafka
资源分类:Python库 所属语言:Python 资源全名:kafka-dev-tools-0.0.1.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
bin/kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zkconnect localhost:2181 --group test 删除topic与数据 1) kafka-topics.sh --delete --zookeeper host:port --topic topicname 2) 删除kafka...
一共包含两个程序,分别是Kafka生产者工具、Kafka消费者工具。 1、使用bootstrap、userName、password连接kafka。 2、可使用text、json格式发送topic消息。 3、异步producer、customer,收发消息畅通无阻。 Kafka...