ZooKeeper Programmer's Guide. Developing Distributed Applications that use
ZooKeeper by. Table of contents. 1 Introduction.
Developing Distributed Applications that use ZooKeeper by ...... There are two
packages that make up the ZooKeeper Java binding: org.apache.zookeeper.
public class Executor implements Watcher, Runnable, DataMonitor. ... The
Watcher interface is defined by the ZooKeeper Java API. ZooKeeper .... dead =
true;.
What is ZooKeeper. • A general wait-free coordination service. • membership,
leader election, lock… • Provide order guarantees for operations. • Linearizable ...
Zusammenfassung—In dieser Ausarbeitung soll Apache Zoo-. Keeper
beschrieben ... ein Framework wie Apache ZooKeeper zu benutzen, dass diese.
Dienste ...
org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg.
QuorumPeerMain starts a ZooKeeper server, JMX management beans are also
registered.
Releases may be downloaded from Apache mirrors: Download ... Release notes
for Apache Zookeeper releases are available in Jira: Browse release notes. 3.
election a primary from redundant replicas repository for high availabable files.
Щитинин Д. А. (CompSciCenter). Apache ZooKeeper. 11 ноября 2013 г. 4 / 54 ...
When our nation's telecommunications system was first established, it was ... They made telephone communication possible
For over a decade, the Commission has endeavored to protect and promote the open Internet. FCC. Chairs and Commissioners
consumer collaboration has already occurred on bringing us to this point. Let's make it to the ... highlight the need fo
Nov 16, 2015 - We have two consumer applications used by more than 55 million people: Foursquare, which helps people fin
Apr 11, 2016 - And the importance of Business Data Services to the economy is ... disadvantage business customers and th
Apr 11, 2016 - This is my first time speaking to you since you became INCOMPAS ⦠... carriers alike, and in some marke
Apache Zookeeper. ➢Simple, high performance kernel for building distributed
coordination primitives. ➢Zookeeper is not a specific coordination primitive per se
,.
Jun 12, 2014 - Thank you to the American Enterprise Institute for convening this ... Similar threats continue to grow wi
Jun 26, 2015 - There are multiple benefits of the network's evolution from hardware to ... With all of these advantages
Mar 21, 2016 - stop to realize that our Internet Service Provider â or ISP â is also ... by the phone company about
Sep 7, 2016 - 5G is like the missing piece of the puzzle depicting the wireless future: .... sacrificing the advantages
May 11, 2016 ... Most of us understand that the social media we join and the websites we visit collect our ... Think about all the mobile apps that ask forâ ...
Mar 21, 2016 - constantly upgrade our wired and wireless broadband infrastructure. Yes, the ... definitely do â we wil
Jun 26, 2015 - With all of these advantages of software defined networks ... And the same concept, called carrier aggreg
raises national security, law enforcement, foreign policy, or trade policy concerns. ... it's too hard to find informati
Apr 11, 2016 - come before the Commission, notably the proposed mergers of Comcast and Time Warner. Cable, which we reje
Jun 7, 2012 ... What's Ahead? ❖ Tonight I will explain. ❖ What ZooKeeper is. ❖ What problems it
can help you solve. ❖ How it works. ❖ How to install ...
Overview of Apache ZooKeeper Tom Wheeler Cloudera, Inc.
What’s Ahead? v Tonight I will explain v What ZooKeeper is v What problems it can help you solve v How it works v How to install, configure and run it v Where you can learn more
What is ZooKeeper? v A distributed coordination service v Reliable and highly-available v Inspired by Google’s Chubby lock service v But quite a bit different in design philosophy
v A top-level Apache project v Originally created at Yahoo!
What’s So Great About it? v Flexible v Library v Corresponding network service
v Simple v Primitives v Recipes
v Loosely-coupled v Built-in security
Why is ZooKeeper Needed? v Imagine you’ve got a multithreaded program v And you need a lock to coordinate among threads v So you use the java.util.concurrent package
v And later your program has trouble scaling up v So you decide to scale out
v How do you handle locking across machines?
Why is ZooKeeper Needed?
“The network is reliable” v Peter Deutsch, et al.
Fallacy
What Can You Do With It? v Distributed locks v Distributed queues v Group membership v Master elections v Distributed configuration v And much more…
Other ZooKeeper Properties v Operations are ordered v Distributed state can lag, but it’s never wrong
v Updates are atomic v They either succeed completely or fail completely v There are no partially applied modifications
v Changes are durable v A change, once applied, will persist v Even if the machine fails. Even if Godzilla attacks.
Who Is Using It? v ZooKeeper is part of the “Hadoop Ecosystem” v Many Hadoop-related projects depend on it v HBase v HDFS High Availability v Flume
v But it’s not specific to Hadoop v No external dependencies (aside from Java)
Who Else Uses It? v Other open source projects are using it too v Neo4J v Apache Solr (Cloud Edition) v Eclipse Communication Framework
v Many organizations also use ZooKeeper v Yahoo v Rackspace v Lots of others who choose not to be named…
ZooKeeper’s Data Model v ZooKeeper models a hierarchical filesystem v Nodes in this tree are called znodes v A znode may contain data and/or other znodes*
/
blues
chicago
rock
delta
metal
punk
Znode Paths v Every znode exists at some path v Paths are always both absolute and canonical v The API uses UNIX-style paths (e.g. /rock/punk)
/
blues
chicago
rock
delta
metal
punk
The ZooKeeper API v The API defines just a few operations, mainly v Create a node v Check if a node exists / Access the node v Delete a node v Get / set children v Get / set data v Plus a few others v Synchronizing state, registering watches, handling ACLs
Znode Types v There are two main types of znodes v Persistent v Available until explicitly removed
v Ephemeral v Tied to the session of the client which created it v Only available for the duration of that session v Ephemeral nodes cannot have children
v The type is specified at time of creation
Sequential Znodes v Znodes optionally allow a sequence number v Just set a flag when creating the node v Actual name based on a counter’s current value v For example, foo becomes foo-0000000001
v This is handy for maintaining a global order v Such as when creating a distributed lock
Security v ZooKeeper now supports Kerberos security v Authorization is done via ACLs v Supports several types of restrictions v Message digest v Hostname v IP address
v Can limit access by function v Read, write, delete, etc.
ZooKeeper Standalone Mode v Standalone mode is mainly used for development v There is a single ZooKeeper daemon running v Handles both read and write requests from clients
ZK Service
client
client
ZooKeeper Clustered Mode v There’s an ensemble of servers v One server is elected as the leader v Followers only service read requests
ZK Leader
ZK Follower
ZK Follower
client
client
client
client
How Do You Install It? v Get it from a mirror (zookeeper.apache.org)
$ tar -zxvf zookeeper-3.4.3.tar.gz $ cd zookeeper-3.4.3 $ export PATH=$PATH:`pwd`/bin
v It’s also part of CDH v Cloudera’s Distribution including Apache Hadoop v You can install from packages (yum, apt-get, etc.) v This offers other conveniences (init scripts, etc.)
How Do You Configure It? # NOTE: we’re in the zookeeper-3.4.3 directory $ cp conf/zoo_sample.cfg conf/zoo.cfg $ vi conf/zoo.cfg
v Three required configuration parameters v tickTime: basic unit of time in ZooKeeper v dataDir: local filesystem where data is stored v clientPort: TCP port to which clients connect
v If using cluster mode, list other ZK nodes too
How Do You Run It? v If you installed from a tarball $ zkServer.sh start
v If you installed from CDH packages $ sudo service zookeeper-server start
How Do You Use It? v Put the ZooKeeper JAR in your project v Just as you would for any other library
v Use the API to create an application
Where Do You Learn More? v Apache ZooKeeper Web site v
http://zookeeper.apache.org/
v Cloudera’s CDH4 documentation v
http://www.cloudera.com/
v Hadoop: The Definitive Guide (O’Reilly) v Chapter 14 covers ZooKeeper in detail