public class MiniZooKeeperCluster
extends org.apache.hadoop.service.AbstractService
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_CLIENT_CONNECTIONS |
| Constructor and Description |
|---|
MiniZooKeeperCluster(int numZooKeeperServers) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBackupZooKeeperServerNum() |
int |
getClientPort() |
String |
getZkQuorum() |
int |
getZooKeeperServerNum() |
int |
killCurrentActiveZooKeeperServer() |
void |
killOneBackupZooKeeperServer()
Kill one back up ZK servers
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
void |
setDefaultClientPort(int clientPort) |
void |
setTickTime(int tickTime) |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final int MAX_CLIENT_CONNECTIONS
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceExceptionpublic void setDefaultClientPort(int clientPort)
public void setTickTime(int tickTime)
public int getBackupZooKeeperServerNum()
public int getZooKeeperServerNum()
protected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStop()
throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionpublic int killCurrentActiveZooKeeperServer()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic void killOneBackupZooKeeperServer()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic int getClientPort()
public String getZkQuorum()
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.