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.ZookeeperShellCommandProviderNested classes/interfaces inherited from interface org.apache.hadoop.hbase.ClusterManager
ClusterManager.ServiceType -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate 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
Constructors -
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.ShellExecResponsemasterExec(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.ShellExecResponseregionServerExec(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.ServerNameresolveRegionServerName(org.apache.hadoop.hbase.client.AsyncAdmin admin, String hostname) private static RuntimeExceptionserverNotFound(String hostname) private static RuntimeExceptionunsupportedServiceType(ClusterManager.ServiceType serviceType) Methods inherited from class org.apache.hadoop.hbase.HBaseClusterManager
execSudo, execSudoWithRetries, getCommandProvider, getServiceUser, isRunning, kill, restart, resume, setConf, signal, start, stop, suspendMethods inherited from class org.apache.hadoop.conf.Configured
getConfMethods 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
-
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:HBaseClusterManagerExecute the given command on the host using SSH- Overrides:
execin 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
-