Databases Reference
In-Depth Information
Has access control lists.
A session-based node called the ephemeral node can be created and destroyed by a session.
zNodes can be sequential; this ordering helps manage complex interconnected tasks.
zNodes can have watches to provide for callbacks. This helps when data is distributed and
tasks are distributed in a large cluster.
Zookeeper has a simple set of API commands to work with:
string create(path, data, acl, flags)
delete(path, expected_version)
stat set_data(path, data, expected_version)
(data, stat) get_data(path, watch)
stat exists(path, watch)
string get_children(path, watch)
Zookeeper offers a data consistency model to provide guarantees with its services:
Sequential consistency—updates from a client are applied in the order sent.
Atomicity—updates either succeed or fail.
Single system image—unique view, regardless of the server.
Durability—updates once succeeded will not be undone.
Timeliness—lag is bounded, read operations can lag behind leaders.
Used for:
Configuration service—get the latest configuration and get notified when changes occur.
Lock service—provide mutual exclusion
Leader election—there can be only one.
Group membership—dynamically determine members of a group.
Queue producer/consumer paradigm.
In the Hadoop ecosystem, Zookeeper is implemented as a service to coordinate tasks. Figure 4.14
shows the implementation model for Zookeeper.
Zookeeper as a service can be run in two modes:
Standalone mode . There is a single Zookeeper server, and this configuration is useful for
development or testing but provides no guarantees of high availability or resilience.
Follower
(Server)
Follower
(Server)
Leader
(Server)
Follower
(Server)
Follower
(Server)
R
W
W
R
R
R
Client
Client
Client
Client
Client
Client
FIGURE 4.14
Zookeeper ensemble.
 
Search WWH ::




Custom Search