|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.protobuf.generated.AggregateProtos.AggregateService
org.apache.hadoop.hbase.coprocessor.AggregateImplementation<T,S,P,Q,R>
T
- Cell value data typeS
- Promoted data typeP
- PB message that is used to transport initializer specific bytesQ
- PB message that is used to transport Cell (R
- PB message that is used to transport Promoted (@InterfaceAudience.Private public class AggregateImplementation<T,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,R extends com.google.protobuf.Message>
A concrete AggregateProtocol implementation. Its system level coprocessor
that computes the aggregate function at a region level.
ColumnInterpreter
is used to interpret column value. This class is
parameterized with the following (these are the types with which the ColumnInterpreter
is parameterized, and for more description on these, refer to ColumnInterpreter
):
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.protobuf.generated.AggregateProtos.AggregateService |
---|
AggregateProtos.AggregateService.BlockingInterface, AggregateProtos.AggregateService.Interface, AggregateProtos.AggregateService.Stub |
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor |
---|
Coprocessor.State |
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
|
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor |
---|
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION |
Constructor Summary | |
---|---|
AggregateImplementation()
|
Method Summary | |
---|---|
void |
getAvg(com.google.protobuf.RpcController controller,
AggregateProtos.AggregateRequest request,
com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
Gives a Pair with first object as Sum and second object as row count, computed for a given combination of column qualifier and column family in the given row range as defined in the Scan object. |
void |
getMax(com.google.protobuf.RpcController controller,
AggregateProtos.AggregateRequest request,
com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
Gives the maximum for a given combination of column qualifier and column family, in the given row range as defined in the Scan object. |
void |
getMedian(com.google.protobuf.RpcController controller,
AggregateProtos.AggregateRequest request,
com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
Gives a List containing sum of values and sum of weights. |
void |
getMin(com.google.protobuf.RpcController controller,
AggregateProtos.AggregateRequest request,
com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
Gives the minimum for a given combination of column qualifier and column family, in the given row range as defined in the Scan object. |
void |
getRowNum(com.google.protobuf.RpcController controller,
AggregateProtos.AggregateRequest request,
com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
Gives the row count for the given column family and column qualifier, in the given row range as defined in the Scan object. |
com.google.protobuf.Service |
getService()
|
void |
getStd(com.google.protobuf.RpcController controller,
AggregateProtos.AggregateRequest request,
com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
Gives a Pair with first object a List containing Sum and sum of squares, and the second object as row count. |
void |
getSum(com.google.protobuf.RpcController controller,
AggregateProtos.AggregateRequest request,
com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
Gives the sum for a given combination of column qualifier and column family, in the given row range as defined in the Scan object. |
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)
|
Methods inherited from class org.apache.hadoop.hbase.protobuf.generated.AggregateProtos.AggregateService |
---|
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 |
Field Detail |
---|
protected static final org.apache.commons.logging.Log log
Constructor Detail |
---|
public AggregateImplementation()
Method Detail |
---|
public void getMax(com.google.protobuf.RpcController controller, AggregateProtos.AggregateRequest request, com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
getMax
in class AggregateProtos.AggregateService
public void getMin(com.google.protobuf.RpcController controller, AggregateProtos.AggregateRequest request, com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
getMin
in class AggregateProtos.AggregateService
public void getSum(com.google.protobuf.RpcController controller, AggregateProtos.AggregateRequest request, com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
getSum
in class AggregateProtos.AggregateService
public void getRowNum(com.google.protobuf.RpcController controller, AggregateProtos.AggregateRequest request, com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
getRowNum
in class AggregateProtos.AggregateService
IOException
public void getAvg(com.google.protobuf.RpcController controller, AggregateProtos.AggregateRequest request, com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
The average is computed in AggregationClient#avg(byte[], ColumnInterpreter, Scan) by processing results from all regions, so its "ok" to pass sum and a Long type.
getAvg
in class AggregateProtos.AggregateService
public void getStd(com.google.protobuf.RpcController controller, AggregateProtos.AggregateRequest request, com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
getStd
in class AggregateProtos.AggregateService
public void getMedian(com.google.protobuf.RpcController controller, AggregateProtos.AggregateRequest request, com.google.protobuf.RpcCallback<AggregateProtos.AggregateResponse> done)
getMedian
in class AggregateProtos.AggregateService
public com.google.protobuf.Service getService()
getService
in interface CoprocessorService
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 host
IOException
- if the provided environment is not an instance of
RegionCoprocessorEnvironment
public void stop(CoprocessorEnvironment env) throws IOException
stop
in interface Coprocessor
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |