@InterfaceAudience.Private public class ZNodeClusterManager extends org.apache.hadoop.conf.Configured implements ClusterManager
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
ZNodeClusterManager.CmdType |
ClusterManager.ServiceType| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOG |
private static String |
SIGCONT |
private static String |
SIGKILL |
private static String |
SIGSTOP |
| Constructor and Description |
|---|
ZNodeClusterManager() |
| Modifier and Type | Method and Description |
|---|---|
private void |
createOpCommand(String hostname,
ClusterManager.ServiceType service,
HBaseClusterManager.CommandProvider.Operation op) |
private String |
createZNode(String hostname,
String cmd) |
protected HBaseClusterManager.CommandProvider |
getCommandProvider(ClusterManager.ServiceType service) |
private String |
getZKQuorumServersStringFromHbaseConfig() |
boolean |
isRunning(ClusterManager.ServiceType service,
String hostname,
int port)
Returns whether the service is running on the remote host.
|
void |
kill(ClusterManager.ServiceType service,
String hostname,
int port)
Kills the service running on the given host
|
void |
restart(ClusterManager.ServiceType service,
String hostname,
int port)
Restart the service on the given host
|
void |
resume(ClusterManager.ServiceType service,
String hostname,
int port)
Resumes the services running on the given host
|
void |
signal(ClusterManager.ServiceType service,
String signal,
String hostname) |
void |
start(ClusterManager.ServiceType service,
String hostname,
int port)
Start the service on the given host
|
void |
stop(ClusterManager.ServiceType service,
String hostname,
int port)
Stop the service on the given host
|
void |
suspend(ClusterManager.ServiceType service,
String hostname,
int port)
Suspends the service running on the given host
|
private static final org.slf4j.Logger LOG
private static final String SIGKILL
private static final String SIGSTOP
private static final String SIGCONT
public ZNodeClusterManager()
private String getZKQuorumServersStringFromHbaseConfig()
private String createZNode(String hostname, String cmd) throws IOException
IOExceptionprotected HBaseClusterManager.CommandProvider getCommandProvider(ClusterManager.ServiceType service) throws IOException
IOExceptionpublic void signal(ClusterManager.ServiceType service, String signal, String hostname) throws IOException
IOExceptionprivate void createOpCommand(String hostname, ClusterManager.ServiceType service, HBaseClusterManager.CommandProvider.Operation op) throws IOException
IOExceptionpublic void start(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManagerstart in interface ClusterManagerIOExceptionpublic void stop(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManagerstop in interface ClusterManagerIOExceptionpublic void restart(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManagerrestart in interface ClusterManagerIOExceptionpublic void kill(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManagerkill in interface ClusterManagerIOExceptionpublic void suspend(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManagersuspend in interface ClusterManagerIOExceptionpublic void resume(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManagerresume in interface ClusterManagerIOExceptionpublic boolean isRunning(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManagerisRunning in interface ClusterManagerIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.