Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Apache ZooKeeper Intro and Sample

DZone's Guide to

Apache ZooKeeper Intro and Sample

· Big Data Zone
Free Resource

Need to build an application around your data? Learn more about dataflow programming for rapid development and greater creativity. 

ZooKeeper is an open source distributed configuration service, synchronization service, and naming registry for large distributed systems. ZooKeeper was a sub project of Hadoop. ZooKeeper's architecture supports high-availability through redundant services. It support naming service, configuration management, synchronization, leader election, message Queue and notification system. ZooKeeper is a high-performance coordination service for distributed applications

“ZooKeeper: Because Coordinating Distributed Systems is a Zoo”

Let is start work with Zoo-Keeper.

1. Download stable version from here

2. Unzip it ‘C:\zookeeper\zookeeper-3.4.6\’

3. Setup zoo configuration in <zookeeper-home>\zoo.cfg

  • tickTime: do heartbeats and the minimum session timeout (milliseconds)
  • dataDir: the location to store
  • clientPort: the port to listen for client connections

eg:

tickTime=2000
initLimit=10
syncLimit=5
dataDir=C:\zookeeper\zookeeper-3.4.6\data
clientPort=2181

4. You can define log level and log properties in ‘log4j.properties’

5. You can start zookeeper server by  zkServer.cmd/ .sh

image

6. Sample client can be start by  zkCli.cmd / .sh

image

References

[1] http://zookeeper.apache.org/releases.html

Check out the Exaptive data application Studio. Technology agnostic. No glue code. Use what you know and rely on the community for what you don't. Try the community version.

Topics:

Published at DZone with permission of Madhuka Udantha, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}