public class RowCountEndpoint extends ExampleProtos.RowCountService implements Coprocessor, CoprocessorService
For the protocol buffer definition of the RowCountService, see the source file located under hbase-server/src/main/protobuf/Examples.proto.
ExampleProtos.RowCountService.BlockingInterface, ExampleProtos.RowCountService.Interface, ExampleProtos.RowCountService.Stub
Coprocessor.State
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,
ExampleProtos.CountRequest request,
com.google.protobuf.RpcCallback<ExampleProtos.CountResponse> done)
Returns a count of all KeyValues in the region where this coprocessor is loaded.
|
void |
getRowCount(com.google.protobuf.RpcController controller,
ExampleProtos.CountRequest request,
com.google.protobuf.RpcCallback<ExampleProtos.CountResponse> done)
Returns a count of the rows in the region where this coprocessor is loaded.
|
com.google.protobuf.Service |
getService()
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) |
callMethod, getDescriptor, getDescriptorForType, getRequestPrototype, getResponsePrototype, newBlockingStub, newReflectiveBlockingService, newReflectiveService, newStub
public com.google.protobuf.Service getService()
getService
in interface CoprocessorService
public void getRowCount(com.google.protobuf.RpcController controller, ExampleProtos.CountRequest request, com.google.protobuf.RpcCallback<ExampleProtos.CountResponse> done)
getRowCount
in class ExampleProtos.RowCountService
public void getKeyValueCount(com.google.protobuf.RpcController controller, ExampleProtos.CountRequest request, com.google.protobuf.RpcCallback<ExampleProtos.CountResponse> done)
getKeyValueCount
in class 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
stop
in interface Coprocessor
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.