본문 바로가기
dev/hbase

Steps to install Replicated ZooKeeper

by igooo 2014. 5. 9.
728x90

ZooKeeper

download 

http://www.apache.org/dyn/closer.cgi/zookeeper/

$ wget http://apache.mirror.cdnetworks.com/zookeeper/stable/zookeeper-3.4.6.tar.gz

$ tar zxvf zookeeper-3.4.6.tar.gz


Configuration

zoo.cfg

# the basic time unit in milliseconds used by ZooKeeper. It is used to do heartbeats and the minimum session timeout will be twice the tickTime.

tickTime=2000

#the location to store the in-memory database snapshots and, unless specified otherwise, the transaction log of updates to the database.

dataDir=/home/zookeeper/data/

the port to listen for client connections

clientPort=2181

initLimit is timeouts ZooKeeper uses to limit the length of time the ZooKeeper servers in quorum have to connect to a leader.

initLimit=5

The entry syncLimit limits how far out of date a server can be from a leader.

syncLimit=2


server.1=zoo1:2888:3888

server.2=zoo1:2888:3888

server.3=zoo1:2888:3888


You attribute the server id to each machine by creating a file named myid, one for each server, which resides in that server's data directory, as specified by the configuration file parameter dataDir.

cat myid

1



Start / Stop ZooKeeper

$ bin/zkServer.sh start

$ bin/zkServer.sh stop



Connenting to ZooKeeper

$ bin/zkCli.sh -server 127.0.0.1:2181

[zkshell: 0] ls /
[zookeeper]



Reference

http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html#sc_Download



Next : Install Hbase

'dev > hbase' 카테고리의 다른 글

Steps to install Distributed HBase  (0) 2014.05.09
Steps to install Hadoop 2.2.0 release on multi-node cluster  (0) 2014.05.09