@InterfaceAudience.Private public class RowCountEndpoint extends org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.RowCountService implements RegionCoprocessor
For the protocol buffer definition of the RowCountService, see the source file located under hbase-examples/src/main/protobuf/Examples.proto.
org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.RowCountService.BlockingInterface, org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.RowCountService.Interface, org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.RowCountService.Stub
Coprocessor.State
Modifier and Type | Field and Description |
---|---|
private RegionCoprocessorEnvironment |
env |
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
Constructor and Description |
---|
RowCountEndpoint() |
Modifier and Type | Method and Description |
---|---|
void |
getKeyValueCount(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.CountRequest request,
com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.CountResponse> done)
Returns a count of all KeyValues in the region where this coprocessor is loaded.
|
void |
getRowCount(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.CountRequest request,
com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.CountResponse> done)
Returns a count of the rows in the region where this coprocessor is loaded.
|
Iterable<com.google.protobuf.Service> |
getServices()
Just returns a reference to this object, which implements the RowCounterService interface.
|
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 RowCountEndpoint()
public Iterable<com.google.protobuf.Service> getServices()
getServices
in interface Coprocessor
Service
s or empty collection. Implementations should never return
null.public void getRowCount(com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.CountRequest request, com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.CountResponse> done)
getRowCount
in class org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.RowCountService
public void getKeyValueCount(com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.CountRequest request, com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.CountResponse> done)
getKeyValueCount
in class org.apache.hadoop.hbase.coprocessor.example.generated.ExampleProtos.RowCountService
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
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.