org.apache.hadoop.hbase.zookeeper
Class MiniZooKeeperCluster

java.lang.Object
  extended by org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster

public class MiniZooKeeperCluster
extends Object

TODO: Most of the code in this class is ripped from ZooKeeper tests. Instead of redoing it, we should contribute updates to their code which let us more easily access testing helper objects.


Constructor Summary
MiniZooKeeperCluster()
          Create mini ZooKeeper cluster.
MiniZooKeeperCluster(org.apache.hadoop.conf.Configuration configuration)
          Create mini ZooKeeper cluster with configuration (usually from test environment)
 
Method Summary
 int getClientPort()
           
 void setClientPort(int clientPort)
           
 void setTickTime(int tickTime)
           
 void shutdown()
           
 int startup(File baseDir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiniZooKeeperCluster

public MiniZooKeeperCluster()
Create mini ZooKeeper cluster.


MiniZooKeeperCluster

public MiniZooKeeperCluster(org.apache.hadoop.conf.Configuration configuration)
Create mini ZooKeeper cluster with configuration (usually from test environment)

Method Detail

setClientPort

public void setClientPort(int clientPort)

getClientPort

public int getClientPort()

setTickTime

public void setTickTime(int tickTime)

startup

public int startup(File baseDir)
            throws IOException,
                   InterruptedException
Parameters:
baseDir -
Returns:
ClientPort server bound to.
Throws:
IOException
InterruptedException

shutdown

public void shutdown()
              throws IOException
Throws:
IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.