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 ClassesNested classes/interfaces inherited from interface org.apache.hadoop.hbase.ClusterManager
ClusterManager.ServiceType -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcreateOpCommand(String hostname, ClusterManager.ServiceType service, HBaseClusterManager.CommandProvider.Operation op) private StringcreateZNode(String hostname, String cmd) protected HBaseClusterManager.CommandProviderprivate StringbooleanisRunning(ClusterManager.ServiceType service, String hostname, int port) Returns whether the service is running on the remote host.voidkill(ClusterManager.ServiceType service, String hostname, int port) Kills the service running on the given hostvoidrestart(ClusterManager.ServiceType service, String hostname, int port) Restart the service on the given hostvoidresume(ClusterManager.ServiceType service, String hostname, int port) Resumes the services running on the given hostvoidsignal(ClusterManager.ServiceType service, String signal, String hostname) voidstart(ClusterManager.ServiceType service, String hostname, int port) Start the service on the given hostvoidstop(ClusterManager.ServiceType service, String hostname, int port) Stop the service on the given hostvoidsuspend(ClusterManager.ServiceType service, String hostname, int port) Suspends the service running on the given hostMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ClusterManagerStart the service on the given host- Specified by:
startin interfaceClusterManager- Throws:
IOException
-
stop
Description copied from interface:ClusterManagerStop the service on the given host- Specified by:
stopin interfaceClusterManager- Throws:
IOException
-
restart
public void restart(ClusterManager.ServiceType service, String hostname, int port) throws IOException Description copied from interface:ClusterManagerRestart the service on the given host- Specified by:
restartin interfaceClusterManager- Throws:
IOException
-
kill
Description copied from interface:ClusterManagerKills the service running on the given host- Specified by:
killin interfaceClusterManager- Throws:
IOException
-
suspend
public void suspend(ClusterManager.ServiceType service, String hostname, int port) throws IOException Description copied from interface:ClusterManagerSuspends the service running on the given host- Specified by:
suspendin interfaceClusterManager- Throws:
IOException
-
resume
public void resume(ClusterManager.ServiceType service, String hostname, int port) throws IOException Description copied from interface:ClusterManagerResumes the services running on the given host- Specified by:
resumein interfaceClusterManager- Throws:
IOException
-
isRunning
public boolean isRunning(ClusterManager.ServiceType service, String hostname, int port) throws IOException Description copied from interface:ClusterManagerReturns whether the service is running on the remote host. This only checks whether the service still has a pid.- Specified by:
isRunningin interfaceClusterManager- Throws:
IOException
-