is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. Implement the simple version of Zookeeper interface:
public class ZooKeeperService {
// Create a new zNode with the given path & value. Throw
// InvalidArgument exception if the parents node do not exist.
// E.g., path: '/a/b/c', zNode 'a' and 'b' must already exist.
void create(String path, int value);
// Set the given value to the zNode at the given path. Throw
// InvalidArgument exception if a zNode does not exist at
// the given path.
void set(String path, int value);
// Get the value of the zNode at the given path. Throw
// InvalidArgument exception if a zNode does not exist at the
// given path.
int get(String path);
// Register callback to call when they are any changes under
// the given path. Throw InvalidArgument exception if a zNode
// does not exist at the given path.
void watch(String path, Callback<Node, Void> callback);
}