org.apache.zookeeper
Class ZooKeeperMain

java.lang.Object
  extended by org.apache.zookeeper.ZooKeeperMain

public class ZooKeeperMain
extends java.lang.Object

The command line client to ZooKeeper.


Constructor Summary
ZooKeeperMain(java.lang.String[] args)
           
ZooKeeperMain(ZooKeeper zk)
           
 
Method Summary
static boolean createQuota(ZooKeeper zk, java.lang.String path, long bytes, int numNodes)
          this method creates a quota node for the path
static boolean delQuota(ZooKeeper zk, java.lang.String path, boolean bytes, boolean numNodes)
          this method deletes quota for a node.
 void executeLine(java.lang.String line)
           
static java.util.List<java.lang.String> getCommands()
           
 boolean getPrintWatches()
           
static void main(java.lang.String[] args)
           
static void printMessage(java.lang.String msg)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZooKeeperMain

public ZooKeeperMain(java.lang.String[] args)
              throws java.io.IOException,
                     java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

ZooKeeperMain

public ZooKeeperMain(ZooKeeper zk)
Method Detail

getPrintWatches

public boolean getPrintWatches()

getCommands

public static java.util.List<java.lang.String> getCommands()

printMessage

public static void printMessage(java.lang.String msg)

main

public static void main(java.lang.String[] args)
                 throws KeeperException,
                        java.io.IOException,
                        java.lang.InterruptedException
Throws:
KeeperException
java.io.IOException
java.lang.InterruptedException

executeLine

public void executeLine(java.lang.String line)
                 throws java.lang.InterruptedException,
                        java.io.IOException,
                        KeeperException
Throws:
java.lang.InterruptedException
java.io.IOException
KeeperException

delQuota

public static boolean delQuota(ZooKeeper zk,
                               java.lang.String path,
                               boolean bytes,
                               boolean numNodes)
                        throws KeeperException,
                               java.io.IOException,
                               java.lang.InterruptedException
this method deletes quota for a node.

Parameters:
zk - the zookeeper client
path - the path to delete quota for
bytes - true if number of bytes needs to be unset
numNodes - true if number of nodes needs to be unset
Returns:
true if quota deletion is successful
Throws:
KeeperException
java.io.IOException
java.lang.InterruptedException

createQuota

public static boolean createQuota(ZooKeeper zk,
                                  java.lang.String path,
                                  long bytes,
                                  int numNodes)
                           throws KeeperException,
                                  java.io.IOException,
                                  java.lang.InterruptedException
this method creates a quota node for the path

Parameters:
zk - the ZooKeeper client
path - the path for which quota needs to be created
bytes - the limit of bytes on this path
numNodes - the limit of number of nodes on this path
Returns:
true if its successful and false if not.
Throws:
KeeperException
java.io.IOException
java.lang.InterruptedException


Copyright © 2011 The Apache Software Foundation