public class MiniZooKeeperCluster extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT |
| Constructor and Description |
|---|
MiniZooKeeperCluster() |
| Modifier and Type | Method and Description |
|---|---|
int |
getBackupZooKeeperServerNum() |
int |
getClientPort() |
int |
getZooKeeperServerNum() |
int |
killCurrentActiveZooKeeperServer() |
void |
killOneBackupZooKeeperServer()
Kill one back up ZK servers
|
void |
setDefaultClientPort(int clientPort) |
void |
setTickTime(int tickTime) |
void |
shutdown() |
int |
startup(File baseDir) |
int |
startup(File baseDir,
int numZooKeeperServers) |
public static final int DEFAULT_PORT
public void setDefaultClientPort(int clientPort)
public void setTickTime(int tickTime)
public int getBackupZooKeeperServerNum()
public int getZooKeeperServerNum()
public int startup(File baseDir) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic int startup(File baseDir, int numZooKeeperServers) throws IOException, InterruptedException
baseDir - numZooKeeperServers - IOExceptionInterruptedExceptionpublic void shutdown()
throws IOException
IOExceptionpublic int killCurrentActiveZooKeeperServer()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic void killOneBackupZooKeeperServer()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic int getClientPort()
Copyright © 2021 The Apache Software Foundation. All rights reserved.