ZooKeeper实战-Windows集群环境搭建

概述

ZooKeeper是Hadoop的开源子项目(Google Chubby的开源实现),它是一个针对大型分布式系统的可靠协调系统,提供的功能包括:配置管理、命名服务、分布式锁、集群管理等。

本文主要讲述如何在Windows环境上搭建ZooKeeper集群环境,注意是在一台Windows机器上部署3个ZooKeeper实例。
本文介绍的 Zookeeper 是以 3.4.8 稳定版本为基础,下载链接:http://zookeeper.apache.org/releases.html

配置

我在本地Windows机器上部署3个ZooKeeper实例,目录结构如下:

这里写图片描述

其中,Server_A,Server_B,Server_C各自都拥有一个ZooKeeper实例;ZK_data用来存储ZooKeeper数据信息;ZK_log用来存储ZooKeeper日志信息。

解压缩

将下载下来的zookeeper-3.4.8.tar.gz解压缩到F:\ZooKeeper\ZK_Cluster\Server_A目录下,如下图所示:

这里写图片描述

修改zoo.cfg

将conf/zoo_sample.cfg 复制一份命名为zoo.cfg,如下图所示:

这里写图片描述

然后编辑,如下:

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值