|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.coprocessor.BaseEndpointCoprocessor
org.apache.hadoop.hbase.coprocessor.AggregateImplementation
public class AggregateImplementation
A concrete AggregateProtocol implementation. Its system level coprocessor that computes the aggregate function at a region level.
Nested Class Summary |
---|
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 class org.apache.hadoop.hbase.coprocessor.BaseEndpointCoprocessor |
---|
VERSION |
Fields inherited from interface org.apache.hadoop.hbase.coprocessor.AggregateProtocol |
---|
VERSION |
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor |
---|
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER |
Constructor Summary | |
---|---|
AggregateImplementation()
|
Method Summary | ||
---|---|---|
|
getAvg(ColumnInterpreter<T,S> ci,
Scan scan)
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. |
|
|
getMax(ColumnInterpreter<T,S> ci,
Scan scan)
Gives the maximum for a given combination of column qualifier and column family, in the given row range as defined in the Scan object. |
|
|
getMedian(ColumnInterpreter<T,S> ci,
Scan scan)
Gives a List containing sum of values and sum of weights. |
|
|
getMin(ColumnInterpreter<T,S> ci,
Scan scan)
Gives the minimum for a given combination of column qualifier and column family, in the given row range as defined in the Scan object. |
|
ProtocolSignature |
getProtocolSignature(String protocol,
long version,
int clientMethodsHashCode)
Return protocol version corresponding to protocol interface. |
|
|
getRowNum(ColumnInterpreter<T,S> ci,
Scan scan)
|
|
|
getStd(ColumnInterpreter<T,S> ci,
Scan scan)
Gives a Pair with first object a List containing Sum and sum of squares, and the second object as row count. |
|
|
getSum(ColumnInterpreter<T,S> ci,
Scan scan)
Gives the sum for a given combination of column qualifier and column family, in the given row range as defined in the Scan object. |
Methods inherited from class org.apache.hadoop.hbase.coprocessor.BaseEndpointCoprocessor |
---|
getEnvironment, getProtocolVersion, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.hbase.ipc.VersionedProtocol |
---|
getProtocolVersion |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
Constructor Detail |
---|
public AggregateImplementation()
Method Detail |
---|
public ProtocolSignature getProtocolSignature(String protocol, long version, int clientMethodsHashCode) throws IOException
VersionedProtocol
getProtocolSignature
in interface VersionedProtocol
getProtocolSignature
in class BaseEndpointCoprocessor
protocol
- The classname of the protocol interfaceversion
- The version of the protocol that the client speaksclientMethodsHashCode
- the hashcode of client protocol methods
IOException
for a default implementation
public <T,S> T getMax(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
AggregateProtocol
getMax
in interface AggregateProtocol
IOException
public <T,S> T getMin(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
AggregateProtocol
getMin
in interface AggregateProtocol
IOException
public <T,S> S getSum(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
AggregateProtocol
getSum
in interface AggregateProtocol
IOException
public <T,S> long getRowNum(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
getRowNum
in interface AggregateProtocol
IOException
public <T,S> Pair<S,Long> getAvg(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
AggregateProtocol
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 interface AggregateProtocol
IOException
public <T,S> Pair<List<S>,Long> getStd(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
AggregateProtocol
getStd
in interface AggregateProtocol
IOException
public <T,S> List<S> getMedian(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
AggregateProtocol
getMedian
in interface AggregateProtocol
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |