Package org.apache.hadoop.hbase
Class CoprocClusterManager
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.HBaseClusterManager
org.apache.hadoop.hbase.CoprocClusterManager
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,ClusterManager
Overrides commands to make use of coprocessor where possible. Only supports actions taken against
Master and Region Server hosts.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.HBaseClusterManager
HBaseClusterManager.CommandProvider, HBaseClusterManager.HadoopShellCommandProvider, HBaseClusterManager.HBaseShellCommandProvider, HBaseClusterManager.RemoteShell, HBaseClusterManager.RemoteSudoShell, HBaseClusterManager.Signal, HBaseClusterManager.ZookeeperShellCommandProvider
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.ClusterManager
ClusterManager.ServiceType
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private static final Set<ClusterManager.ServiceType>
Fields inherited from class org.apache.hadoop.hbase.HBaseClusterManager
DEFAULT_RETRY_ATTEMPTS, DEFAULT_RETRY_SLEEP_INTERVAL, RETRY_ATTEMPTS_KEY, RETRY_SLEEP_INTERVAL_KEY, retryCounterFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static Set<ClusterManager.ServiceType>
exec
(String hostname, ClusterManager.ServiceType service, String... cmd) Execute the given command on the host using SSHprivate static org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse
masterExec
(org.apache.hadoop.hbase.client.AsyncAdmin admin, org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecRequest req) private static org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse
regionServerExec
(org.apache.hadoop.hbase.client.AsyncAdmin admin, org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecRequest req, org.apache.hadoop.hbase.ServerName targetHost) private static org.apache.hadoop.hbase.ServerName
resolveRegionServerName
(org.apache.hadoop.hbase.client.AsyncAdmin admin, String hostname) private static RuntimeException
serverNotFound
(String hostname) private static RuntimeException
unsupportedServiceType
(ClusterManager.ServiceType serviceType) Methods inherited from class org.apache.hadoop.hbase.HBaseClusterManager
execSudo, execSudoWithRetries, getCommandProvider, getServiceUser, isRunning, kill, restart, resume, setConf, signal, start, stop, suspend
Methods inherited from class org.apache.hadoop.conf.Configured
getConf
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
-
Field Details
-
LOG
-
supportedServices
-
-
Constructor Details
-
CoprocClusterManager
public CoprocClusterManager()
-
-
Method Details
-
exec
protected org.apache.hadoop.hbase.util.Pair<Integer,String> exec(String hostname, ClusterManager.ServiceType service, String... cmd) throws IOException Description copied from class:HBaseClusterManager
Execute the given command on the host using SSH- Overrides:
exec
in classHBaseClusterManager
- Returns:
- pair of exit code and command output
- Throws:
IOException
- if something goes wrong.
-
buildSupportedServicesSet
-
masterExec
private static org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse masterExec(org.apache.hadoop.hbase.client.AsyncAdmin admin, org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecRequest req) -
regionServerExec
private static org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse regionServerExec(org.apache.hadoop.hbase.client.AsyncAdmin admin, org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecRequest req, org.apache.hadoop.hbase.ServerName targetHost) -
resolveRegionServerName
private static org.apache.hadoop.hbase.ServerName resolveRegionServerName(org.apache.hadoop.hbase.client.AsyncAdmin admin, String hostname) -
serverNotFound
-
unsupportedServiceType
-