Package org.apache.hadoop.hbase
Class ZNodeClusterManager
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.ZNodeClusterManager
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,ClusterManager
@Private
public class ZNodeClusterManager
extends org.apache.hadoop.conf.Configured
implements ClusterManager
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.ClusterManager
ClusterManager.ServiceType
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
createOpCommand
(String hostname, ClusterManager.ServiceType service, HBaseClusterManager.CommandProvider.Operation op) private String
createZNode
(String hostname, String cmd) protected HBaseClusterManager.CommandProvider
private String
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 hostvoid
restart
(ClusterManager.ServiceType service, String hostname, int port) Restart the service on the given hostvoid
resume
(ClusterManager.ServiceType service, String hostname, int port) Resumes the services running on the given hostvoid
signal
(ClusterManager.ServiceType service, String signal, String hostname) void
start
(ClusterManager.ServiceType service, String hostname, int port) Start the service on the given hostvoid
stop
(ClusterManager.ServiceType service, String hostname, int port) Stop the service on the given hostvoid
suspend
(ClusterManager.ServiceType service, String hostname, int port) Suspends the service running on the given hostMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
LOG
-
SIGKILL
- See Also:
-
SIGSTOP
- See Also:
-
SIGCONT
- See Also:
-
-
Constructor Details
-
ZNodeClusterManager
public ZNodeClusterManager()
-
-
Method Details
-
getZKQuorumServersStringFromHbaseConfig
-
createZNode
- Throws:
IOException
-
getCommandProvider
protected HBaseClusterManager.CommandProvider getCommandProvider(ClusterManager.ServiceType service) throws IOException - Throws:
IOException
-
signal
public void signal(ClusterManager.ServiceType service, String signal, String hostname) throws IOException - Throws:
IOException
-
createOpCommand
private void createOpCommand(String hostname, ClusterManager.ServiceType service, HBaseClusterManager.CommandProvider.Operation op) throws IOException - Throws:
IOException
-
start
Description copied from interface:ClusterManager
Start the service on the given host- Specified by:
start
in interfaceClusterManager
- Throws:
IOException
-
stop
Description copied from interface:ClusterManager
Stop the service on the given host- Specified by:
stop
in interfaceClusterManager
- Throws:
IOException
-
restart
public void restart(ClusterManager.ServiceType service, String hostname, int port) throws IOException Description copied from interface:ClusterManager
Restart the service on the given host- Specified by:
restart
in interfaceClusterManager
- Throws:
IOException
-
kill
Description copied from interface:ClusterManager
Kills the service running on the given host- Specified by:
kill
in interfaceClusterManager
- Throws:
IOException
-
suspend
public void suspend(ClusterManager.ServiceType service, String hostname, int port) throws IOException Description copied from interface:ClusterManager
Suspends the service running on the given host- Specified by:
suspend
in interfaceClusterManager
- Throws:
IOException
-
resume
public void resume(ClusterManager.ServiceType service, String hostname, int port) throws IOException Description copied from interface:ClusterManager
Resumes the services running on the given host- Specified by:
resume
in interfaceClusterManager
- Throws:
IOException
-
isRunning
public boolean isRunning(ClusterManager.ServiceType service, String hostname, int port) throws IOException Description copied from interface:ClusterManager
Returns whether the service is running on the remote host. This only checks whether the service still has a pid.- Specified by:
isRunning
in interfaceClusterManager
- Throws:
IOException
-