public class RowCountEndpoint extends org.apache.hadoop.hbase.coprocessor.example.generated.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.
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.
|
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) |
private RegionCoprocessorEnvironment env
public com.google.protobuf.Service getService()
getService
in interface CoprocessorService
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
stop
in interface Coprocessor
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.