|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AggregateProtocol
Defines the aggregation functions that are to be supported in this
Coprocessor. For each method, it takes a Scan object and a columnInterpreter.
The scan object should have a column family (else an exception will be
thrown), and an optional column qualifier. In the current implementation
AggregateImplementation
, only one column family and column qualifier
combination is served. In case there are more than one, only first one will
be picked. Refer to AggregationClient
for some general conditions on
input parameters.
Field Summary | |
---|---|
static long |
VERSION
|
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. |
|
|
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. |
|
|
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 interface org.apache.hadoop.hbase.ipc.VersionedProtocol |
---|
getProtocolSignature, getProtocolVersion |
Field Detail |
---|
static final long VERSION
Method Detail |
---|
<T,S> T getMax(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
ci
- scan
-
IOException
<T,S> T getMin(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
ci
- scan
-
IOException
<T,S> S getSum(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
ci
- scan
-
IOException
<T,S> long getRowNum(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
ci
- scan
-
IOException
<T,S> Pair<S,Long> getAvg(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
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.
ci
- scan
-
IOException
<T,S> Pair<List<S>,Long> getStd(ColumnInterpreter<T,S> ci, Scan scan) throws IOException
ci
- scan
-
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |