Migrating Brokers in a Cluster
Brokers can be moved to a new host in a Kafka cluster. This might be needed in the case of catastrophic hardware failure. Make sure the following are true before starting:
- Make sure the cluster is healthy.
- Make sure all replicas are in sync.
- Perform the migration when there is minimal load on the cluster.
Brokers need to be moved one-by-one. There are two techniques available:
- Using kafka-reassign-partitions tool
- 
This method involves more manual work to modify JSON, but does not require manual edits to configuration files. For more information, see kafka-reassign-partitions. 
- Modify the broker IDs in meta.properties
- 
This technique involves less manual work, but requires modifying an internal configuration file. - Start up the new broker as a member of the old cluster.
This creates files in the data directory. 
- Stop both the new broker and the old broker that it is replacing.
- Change broker.id of the new broker to the broker.id of the old one both in Cloudera Manager and in data directory/meta.properties.
- (Optional) Run rsync to copy files from one broker to another.
- Start up the new broker.
It re-replicates data from the other nodes. 
 
- Start up the new broker as a member of the old cluster.
Note that data intensive administration operations such as rebalancing partitions, adding a broker, removing a broker, or bootstrapping a new machine can cause significant additional load on the cluster.
To avoid performance degradation of business workloads, you can limit the resources that these background processes can consume by specifying the -throttleparameter when running kafka-reassign-partitions.
Using rsync to Copy Files from One Broker to Another
You can run rsync command to copy over all data from an old broker to a new broker, preserving modification times and permissions. Using rsync allows you to avoid having to re-replicate the data from the leader. You have to ensure that the disk structures match between the two brokers, or you have to verify the meta.properties file between the source and destination brokers (because there is one meta.properties file for each data directory).
Run the following command on destination broker:
rsync -avz
src_broker:src_data_dir
dest_data_dir
If you plan to change the broker ID, edit dest_data_dir/meta.properties.
https://www.cloudera.com/documentation/enterprise/6/latest/topics/kafka_admin_migration.html
Migrating Brokers in a Cluster的更多相关文章
- How to choose the number of topics/partitions in a Kafka cluster?
		This is a common question asked by many Kafka users. The goal of this post is to explain a few impor ... 
- How to choose the number oftopics/partitions in a Kafka cluster?
		How to choose the number oftopics/partitions in a Kafka cluster? 如何为一个kafka集群选择topics/partitions的数量? ... 
- Redis Cluster实现原理
		一.Redis Cluster主要特性和设计 集群目标 1)高性能和线性扩展,最大可以支撑到1000个节点:Cluster架构中无Proxy层,Master与slave之间使用异步replic ... 
- edis Cluster实现原理
		一.Redis Cluster主要特性和设计 集群目标 1)高性能和线性扩展,最大可以支撑到1000个节点:Cluster架构中无Proxy层,Master与slave之间使用异步replic ... 
- 分布式缓存Redis使用心得
		一.缓存在系统中用来做什么 1. 少量数据存储,高速读写访问.通过数据全部in-momery 的方式来保证高速访问,同时提供数据落地的功能,实际这正是Redis最主要的适用场景. 2. 海量数据存储, ... 
- linkedin开源的kafka-monitor安装文档
		linkedin开源的kafka-monitor安装文档 linkedin 开源的kafka-monitor的安装使用可以参考官方的readme:流程介绍的已经比较清楚,但是还是有一些地方需要修正.让 ... 
- redis + 主从 + 持久化 + 分片 + 集群 + spring集成
		Redis是一个基于内存的数据库,其不仅读写速度快,每秒可以执行大约110000的写操作,81000的读取操作,而且其支持存储字符串,哈希结构,链表,集合丰富的数据类型.所以得到很多开发者的青睐.加之 ... 
- Docker Resources
		Menu Main Resources Books Websites Documents Archives Community Blogs Personal Blogs Videos Related ... 
- Redis集群明细文档
		Redis目前版本是没有提供集群功能的,如果要实现多台Redis同时提供服务只能通过客户端自身去实现(Memchached也是客户端实现分布式).目前根据文档已经看到Redis正在开发集群功能,其中一 ... 
随机推荐
- bootstap初识之css
			老师的博客:https://www.cnblogs.com/liwenzhou/p/8214637.html bootstrap中文网:http://www.bootcss.com/ 官网:https ... 
- spring 【二】学习之spring EL
			spring EL-spring 表达式语言,支持在xml和注解的形式,类似于JSP的el表达式的形式. 其主要使用@Value注解的结构形式 其主要功能 [1].注入普通字符串 [2].注入操作系统 ... 
- linux中使用docker-compose部署软件配置分享
			本篇将分享一些 docker-compose 的配置,可参考其总结自己的一套基于docker的开发/生产环境配置. 安装docker及docker-compose install docker cur ... 
- Activity 之使用
			Activity 之使用 本文内容 1. 使用 Activity 显式简单界面 2. Activity 之间的跳转 2.1 startActivity 2.3 startActivityForResu ... 
- django框架使用mysql步骤
			在创建好django项目的基础上来讲解使用orm框架 注意:首先在mysql中手动或者通过命令创建一个数据库,我先创建一个名为orm的数据库. 1:在项目文件夹中的settings.py文件中配置my ... 
- 编辑器开发之 Range 范围对象的学习
			写在前面: 网上有各种富文本编辑器,微博分享等操作,这些功能非常实用,他们就是使用 range,selection 对象来实现的,这两个对象偏冷门,不涉及编辑器一般用不到,range 对象是对选区的操 ... 
- markdown实战问题备忘
			问题一:怎么把文档标题放在中间呢? 下面这个能解决问题. 居中: <center>诶嘿</center> 左对齐: <p align="left"&g ... 
- 跟我一起学opencv 第五课之图像的混合
			*理论-线性混合操作 g(x) = (1-α)f0(x)+αf1(x) α的取值范围位0-1之间 f0(x)为图像1,f1(x)表示第二张图像 α是混合系数 g(x)是生成的图像,对每一个像素 ... 
- Docker & ASP.NET Core (3):发布镜像
			第一篇:把代码连接到容器 第二篇:定制Docker镜像 上一篇文章最后有个问题,定制的镜像无法正常运行: 这可能是由于无法找到要运行的dll引起的问题. 之前的Dockerfile的文档我是按照微软的 ... 
- Java 核心系列教程
			摘要: 原创出处 https://www.bysocket.com 「公众号:泥瓦匠BYSocket 」欢迎关注和转载,保留摘要,谢谢! 关于Java核心技术学习积累的例子,是初学者及核心技术巩固的最 ... 
