@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
IOException
protected HBaseClusterManager.CommandProvider getCommandProvider(ClusterManager.ServiceType service) throws IOException
IOException
public void signal(ClusterManager.ServiceType service, String signal, String hostname) throws IOException
IOException
private void createOpCommand(String hostname, ClusterManager.ServiceType service, HBaseClusterManager.CommandProvider.Operation op) throws IOException
IOException
public void start(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManager
start
in interface ClusterManager
IOException
public void stop(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManager
stop
in interface ClusterManager
IOException
public void restart(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManager
restart
in interface ClusterManager
IOException
public void kill(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManager
kill
in interface ClusterManager
IOException
public void suspend(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManager
suspend
in interface ClusterManager
IOException
public void resume(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManager
resume
in interface ClusterManager
IOException
public boolean isRunning(ClusterManager.ServiceType service, String hostname, int port) throws IOException
ClusterManager
isRunning
in interface ClusterManager
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.