@InterfaceAudience.Public @InterfaceStability.Evolving public class MiniZooKeeperCluster extends Object
| 构造器和说明 |
|---|
MiniZooKeeperCluster() |
MiniZooKeeperCluster(org.apache.hadoop.conf.Configuration configuration) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addClientPort(int clientPort)
Add a client port to the list.
|
int |
getBackupZooKeeperServerNum() |
int |
getClientPort() |
List<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(File baseDir) |
int |
startup(File baseDir,
int numZooKeeperServers) |
public MiniZooKeeperCluster()
public MiniZooKeeperCluster(org.apache.hadoop.conf.Configuration configuration)
public void addClientPort(int clientPort)
clientPort - the specified portpublic List<Integer> getClientPortList()
public void setDefaultClientPort(int clientPort)
public void setTickTime(int tickTime)
public int getBackupZooKeeperServerNum()
public int getZooKeeperServerNum()
public int startup(File baseDir) throws IOException, InterruptedException
public 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
public int getClientPort()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.