An interface to the Zookeeper cluster coordination server.
Big Plans for 1.0
The 1.0 release will feature a reorganization of the heirarchy. There will be a single top-level
Zookeeper namespace (as opposed to the current layout, with 5-6 different top-level constants), and for the next several releases, there will be a backwards compatible require for users that still need to use the old names.
Copyright 2008 Phillip Pearson, and 2010 Twitter, Inc. Licensed under the MIT License. See the included LICENSE file.
Portions copyright 2008-2010 the Apache Software Foundation, licensed under the Apache 2 license, and used with permission.
Portions contributed to the open source community by HPDC, L.P.
sudo gem install zookeeper
Connect to a server:
require 'rubygems' require 'zookeeper' z = Zookeeper.new("localhost:2181") z.get_children(:path => "/")
The following methods are initially supported:
All support async callbacks. get, get_children and stat support both watchers and callbacks.
Calls take a dictionary of parameters. With the exception of set_acl, the only required parameter is :path. Each call returns a dictionary with at minimum two keys :req_id and :rc.
A Bit about this repository
Twitter's open source office was kind enough to transfer this repository to facilitate development and administration of this repository. The
zookeeper gem's last three releases were recorded in branches
v0.4.4. Releases of the
slyphon-zookeeper gem were cut off of the fork, and unfortunately (due to an oversight on my part) were tagged with unrelated versions. Those were tagged with names
The plan is to keep the
slyphon-zookeeper tags, and to tag the
Further work will be carried out on this repository. The
0.9.3 release of the zookeeper gem will be released under the 'zookeeper' name, and will bring the two divergent (conceptual) branches of development together.