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.

  1. Start up the new broker as a member of the old cluster.

    This creates files in the data directory.

  2. Stop both the new broker and the old broker that it is replacing.
  3. 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.
  4. (Optional) Run rsync to copy files from one broker to another.

    See Using rsync to Copy Files from One Broker to Another.

  5. Start up the new broker.

    It re-replicates data from the other nodes.

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的更多相关文章

  1. 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 ...

  2. 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的数量? ...

  3. Redis Cluster实现原理

    一.Redis Cluster主要特性和设计     集群目标 1)高性能和线性扩展,最大可以支撑到1000个节点:Cluster架构中无Proxy层,Master与slave之间使用异步replic ...

  4. edis Cluster实现原理

    一.Redis Cluster主要特性和设计     集群目标 1)高性能和线性扩展,最大可以支撑到1000个节点:Cluster架构中无Proxy层,Master与slave之间使用异步replic ...

  5. 分布式缓存Redis使用心得

    一.缓存在系统中用来做什么 1. 少量数据存储,高速读写访问.通过数据全部in-momery 的方式来保证高速访问,同时提供数据落地的功能,实际这正是Redis最主要的适用场景. 2. 海量数据存储, ...

  6. linkedin开源的kafka-monitor安装文档

    linkedin开源的kafka-monitor安装文档 linkedin 开源的kafka-monitor的安装使用可以参考官方的readme:流程介绍的已经比较清楚,但是还是有一些地方需要修正.让 ...

  7. redis + 主从 + 持久化 + 分片 + 集群 + spring集成

    Redis是一个基于内存的数据库,其不仅读写速度快,每秒可以执行大约110000的写操作,81000的读取操作,而且其支持存储字符串,哈希结构,链表,集合丰富的数据类型.所以得到很多开发者的青睐.加之 ...

  8. Docker Resources

    Menu Main Resources Books Websites Documents Archives Community Blogs Personal Blogs Videos Related ...

  9. Redis集群明细文档

    Redis目前版本是没有提供集群功能的,如果要实现多台Redis同时提供服务只能通过客户端自身去实现(Memchached也是客户端实现分布式).目前根据文档已经看到Redis正在开发集群功能,其中一 ...

随机推荐

  1. 虚拟机中安装Ubuntu后,安装VMwareTools出错的解决办法:Not enough free space to extract VMwareTools

    1.选择安装VMwareTools 2.将加载后的Vmware Tools中的*.tar.gz文件,复制到桌面后提取,否则会报错: 3.然后进入提取后的文件下,运行终端 sudo ./vmware-i ...

  2. NLP第八条

    今日!我虽啥也没干,但我还是有着学习的心的~          也许是“遵义会议”呢   那也说不定 留下这句话再说 哈哈哈哈哈哈 只能抄抄NLP第八条了  谁叫我选了个灰常有意义的通识课咧 八,每一 ...

  3. 【Teradata SQL】一个字段为空即取另外一个字段(连续取4个字段)-case when

    目标:如果col1为空则取col2的值,如果col2也为空则取col3的值,如果col3还为则取col4的值,如果四个字段均为空则取默认值 1.数据准备 create multiset table t ...

  4. 【机器学习笔记五】聚类 - k均值聚类

    参考资料: [1]Spark Mlib 机器学习实践 [2]机器学习 [3]深入浅出K-means算法  http://www.csdn.net/article/2012-07-03/2807073- ...

  5. 开启全民窃听风云——C#智能录音录像录屏程序源码放送!

    ·引子 我这人从小有个坏毛病,就是喜欢偷窥别人隐私.当然,在道德上,我时刻要求自己做一名正人君子,只不过是心理上有这癖好罢了.所以我从小就对窃听.窃视.黑客技术.破解技术等疯狂着迷!实际上这也是我走上 ...

  6. Spring 对Controller异常的统一处理

    对于Controller的异常处理,分为两种,一种是对已知的异常处理,一种是未知的异常处理 1.定义自定义异常类 /** * @author hzc * */ public class UserNot ...

  7. SpringBoot之GZip压缩,HTTP/2,文件上传,缓存配置

    1 设置应用端口以及context # HTTP Server port server.port=8080 # Make the application accessible on the given ...

  8. Entity Framework 之存储过程篇

    最近几天在搞CRUD,使用的是EF这个ORM,最近的项目中上了存储过程,就把在开发中的经验分享出来!我们先创建一个最基本的存储过程,脚本如下,这是一个不带参数的存储过程,我们从最简单的往上走! cre ...

  9. 写给 Android 开发的小程序布局指南,Flex 布局!

    一.序 Hi,大家好,我是承香墨影! 最近在做小程序,验证一些方向,开发效率确实很快,就是各种微信的审核有点费劲,但是总归是有办法解决的. 想要开发一款小程序,其实和我们正常写一款 App 类似,你需 ...

  10. 【Android Studio安装部署系列】二、Android Studio开发环境搭建

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 概述 Android Studio开发环境安装步骤 下载Android Studio 下载地址: http://www.wanandroi ...