Package org.apache.hadoop.hbase
Class ShellExecEndpointCoprocessor
java.lang.Object
org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecService
org.apache.hadoop.hbase.ShellExecEndpointCoprocessor
- All Implemented Interfaces:
org.apache.hadoop.hbase.Coprocessor
,org.apache.hadoop.hbase.coprocessor.MasterCoprocessor
,org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessor
,org.apache.hbase.thirdparty.com.google.protobuf.Service
@Private
public class ShellExecEndpointCoprocessor
extends org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecService
implements org.apache.hadoop.hbase.coprocessor.MasterCoprocessor, org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessor
Receives shell commands from the client and executes them blindly. Intended only for use by
ChaosMonkey
via CoprocClusterManager
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecService
org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecService.BlockingInterface, org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecService.Interface, org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecService.Stub
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
org.apache.hadoop.hbase.Coprocessor.State
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
private final ExecutorService
private org.apache.hadoop.conf.Configuration
static final long
private static final org.slf4j.Logger
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
doExec
(org.apache.hadoop.util.Shell.ShellCommandExecutor shell, org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse.Builder builder) Executeshell
and collect results intobuilder
as side-effects.Iterable<org.apache.hbase.thirdparty.com.google.protobuf.Service>
private void
runBackgroundTask
(org.apache.hadoop.util.Shell.ShellCommandExecutor shell, org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse> done) private void
runForegroundTask
(org.apache.hadoop.util.Shell.ShellCommandExecutor shell, org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse> done) void
shellExec
(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecRequest request, org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse> done) void
start
(org.apache.hadoop.hbase.CoprocessorEnvironment env) Methods inherited from class org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecService
callMethod, getDescriptor, getDescriptorForType, getRequestPrototype, getResponsePrototype, newBlockingStub, newReflectiveBlockingService, newReflectiveService, newStub
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.hbase.Coprocessor
stop
Methods inherited from interface org.apache.hadoop.hbase.coprocessor.MasterCoprocessor
getMasterObserver
Methods inherited from interface org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessor
getRegionServerObserver
-
Field Details
-
LOG
-
BACKGROUND_DELAY_MS_KEY
- See Also:
-
DEFAULT_BACKGROUND_DELAY_MS
- See Also:
-
backgroundExecutor
-
conf
-
-
Constructor Details
-
ShellExecEndpointCoprocessor
public ShellExecEndpointCoprocessor()
-
-
Method Details
-
getServices
- Specified by:
getServices
in interfaceorg.apache.hadoop.hbase.Coprocessor
-
start
- Specified by:
start
in interfaceorg.apache.hadoop.hbase.Coprocessor
-
shellExec
public void shellExec(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecRequest request, org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse> done) - Specified by:
shellExec
in classorg.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecService
-
runForegroundTask
private void runForegroundTask(org.apache.hadoop.util.Shell.ShellCommandExecutor shell, org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse> done) -
runBackgroundTask
private void runBackgroundTask(org.apache.hadoop.util.Shell.ShellCommandExecutor shell, org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse> done) -
doExec
private void doExec(org.apache.hadoop.util.Shell.ShellCommandExecutor shell, org.apache.hadoop.hbase.coprocessor.protobuf.generated.ShellExecEndpoint.ShellExecResponse.Builder builder) throws IOException Executeshell
and collect results intobuilder
as side-effects.- Throws:
IOException
-