@InterfaceAudience.Public @InterfaceStability.Evolving public class MiniZooKeeperCluster extends java.lang.Object
| Constructor and Description |
|---|
MiniZooKeeperCluster() |
MiniZooKeeperCluster(Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClientPort(int clientPort)
Add a client port to the list.
|
int |
getBackupZooKeeperServerNum() |
int |
getClientPort() |
java.util.List<java.lang.Integer> |
getClientPortList()
Get the list of client ports.
|
int |
getZooKeeperServerNum() |
int |
killCurrentActiveZooKeeperServer() |
void |
killOneBackupZooKeeperServer()
Kill one back up ZK servers
|
void |
setDefaultClientPort(int clientPort) |
void |
setTickTime(int tickTime) |
void |
shutdown() |
int |
startup(java.io.File baseDir) |
int |
startup(java.io.File baseDir,
int numZooKeeperServers) |
public MiniZooKeeperCluster()
public MiniZooKeeperCluster(Configuration configuration)
public void addClientPort(int clientPort)
clientPort - the specified portpublic java.util.List<java.lang.Integer> getClientPortList()
public void setDefaultClientPort(int clientPort)
public void setTickTime(int tickTime)
public int getBackupZooKeeperServerNum()
public int getZooKeeperServerNum()
public int startup(java.io.File baseDir)
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic int startup(java.io.File baseDir,
int numZooKeeperServers)
throws java.io.IOException,
java.lang.InterruptedException
baseDir - numZooKeeperServers - java.io.IOExceptionjava.lang.InterruptedExceptionpublic void shutdown()
throws java.io.IOException
java.io.IOExceptionpublic int killCurrentActiveZooKeeperServer()
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic void killOneBackupZooKeeperServer()
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic int getClientPort()