@InterfaceAudience.LimitedPrivate(value="Coprocesssor") @InterfaceStability.Evolving public abstract class BaseRowProcessorEndpoint<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message> extends org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.RowProcessorService implements RegionCoprocessor
Region.processRowsWithLocks(org.apache.hadoop.hbase.regionserver.RowProcessor<?, ?>)
and Coprocessor endpoints.org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.RowProcessorService.BlockingInterface, org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.RowProcessorService.Interface, org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.RowProcessorService.Stub
Coprocessor.State
Modifier and Type | Field and Description |
---|---|
private RegionCoprocessorEnvironment |
env |
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
Constructor and Description |
---|
BaseRowProcessorEndpoint() |
Modifier and Type | Method and Description |
---|---|
(package private) RowProcessor<S,T> |
constructRowProcessorFromRequest(org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.ProcessRequest request) |
Iterable<com.google.protobuf.Service> |
getServices()
Coprocessor endpoints providing protobuf services should override this method.
|
void |
process(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.ProcessRequest request,
com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.ProcessResponse> done)
Pass a processor to region to process multiple rows atomically.
|
void |
start(CoprocessorEnvironment env)
Stores a reference to the coprocessor environment provided by the
RegionCoprocessorHost from the region where this
coprocessor is loaded. |
void |
stop(CoprocessorEnvironment env)
Called by the
CoprocessorEnvironment during it's own shutdown to stop the coprocessor. |
callMethod, getDescriptor, getDescriptorForType, getRequestPrototype, getResponsePrototype, newBlockingStub, newReflectiveBlockingService, newReflectiveService, newStub
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBulkLoadObserver, getEndpointObserver, getRegionObserver
private RegionCoprocessorEnvironment env
public BaseRowProcessorEndpoint()
public void process(com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.ProcessRequest request, com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.ProcessResponse> done)
TestRowProcessorEndpoint
for example. The request contains information for constructing
processor (see constructRowProcessorFromRequest(org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.ProcessRequest)
. The processor object defines the
read-modify-write procedure.process
in class org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.RowProcessorService
public Iterable<com.google.protobuf.Service> getServices()
Coprocessor
getServices
in interface Coprocessor
Service
s or empty collection. Implementations should never return
null.public void start(CoprocessorEnvironment env) throws IOException
RegionCoprocessorHost
from the region where this
coprocessor is loaded. Since this is a coprocessor endpoint, it always expects to be loaded on
a table region, so always expects this to be an instance of
RegionCoprocessorEnvironment
.start
in interface Coprocessor
env
- the environment provided by the coprocessor hostIOException
- if the provided environment is not an instance of
RegionCoprocessorEnvironment
public void stop(CoprocessorEnvironment env) throws IOException
Coprocessor
CoprocessorEnvironment
during it's own shutdown to stop the coprocessor.stop
in interface Coprocessor
IOException
RowProcessor<S,T> constructRowProcessorFromRequest(org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.ProcessRequest request) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.