@InterfaceAudience.Public public class AggregationClient extends Object implements Closeable
This will serve as the client side handler for invoking the aggregate functions. For all aggregate functions,
HConstants.EMPTY_BYTE_ARRAY
)
Call close()
when done.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
AggregationClient.AggregationClientRpcController
An RpcController implementation for use here in this endpoint.
|
Modifier and Type | Field and Description |
---|---|
private Connection |
connection |
private static org.slf4j.Logger |
log |
Constructor and Description |
---|
AggregationClient(org.apache.hadoop.conf.Configuration cfg)
Constructor with Conf object
|
Modifier and Type | Method and Description |
---|---|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
avg(Table table,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
This is the client side interface/handle for calling the average method for
a given cf-cq combination.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
avg(TableName tableName,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
This is the client side interface/handle for calling the average method for
a given cf-cq combination.
|
void |
close() |
private <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
getAvgArgs(Table table,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It computes average while fetching sum and row count from all the
corresponding regions.
|
private <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
getAvgArgs(TableName tableName,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It computes average while fetching sum and row count from all the
corresponding regions.
|
(package private) byte[] |
getBytesFromResponse(com.google.protobuf.ByteString response) |
private <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
getMedianArgs(Table table,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It helps locate the region with median for a given column whose weight
is specified in an optional column.
|
private <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
getStdArgs(Table table,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It computes a global standard deviation for a given column and its value.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
max(Table table,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It gives the maximum value of a column for a given column family for the
given range.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
max(TableName tableName,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It gives the maximum value of a column for a given column family for the
given range.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
median(Table table,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
This is the client side interface/handler for calling the median method for a
given cf-cq combination.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
median(TableName tableName,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
This is the client side interface/handler for calling the median method for a
given cf-cq combination.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
min(Table table,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It gives the minimum value of a column for a given column family for the
given range.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
min(TableName tableName,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It gives the minimum value of a column for a given column family for the
given range.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
rowCount(Table table,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It gives the row count, by summing up the individual results obtained from
regions.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
rowCount(TableName tableName,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It gives the row count, by summing up the individual results obtained from
regions.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
std(Table table,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
This is the client side interface/handle for calling the std method for a
given cf-cq combination.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
std(TableName tableName,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
This is the client side interface/handle for calling the std method for a
given cf-cq combination.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
sum(Table table,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It sums up the value returned from various regions.
|
<R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> |
sum(TableName tableName,
ColumnInterpreter<R,S,P,Q,T> ci,
Scan scan)
It sums up the value returned from various regions.
|
private static final org.slf4j.Logger log
private final Connection connection
public AggregationClient(org.apache.hadoop.conf.Configuration cfg)
cfg
- Configuration to usepublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> R max(TableName tableName, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
tableName
- the name of the table to scanci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> R max(Table table, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
table
- table to scan.ci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> R min(TableName tableName, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
tableName
- the name of the table to scanci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> R min(Table table, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
table
- table to scan.ci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> long rowCount(TableName tableName, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
tableName
- the name of the table to scanci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> long rowCount(Table table, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
table
- table to scan.ci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> S sum(TableName tableName, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
tableName
- the name of the table to scanci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> S sum(Table table, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
table
- table to scan.ci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.private <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> Pair<S,Long> getAvgArgs(TableName tableName, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
tableName
- the name of the table to scanscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.private <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> Pair<S,Long> getAvgArgs(Table table, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
table
- table to scan.scan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> double avg(TableName tableName, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
tableName
- the name of the table to scanci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> double avg(Table table, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
table
- table to scan.ci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.private <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> Pair<List<S>,Long> getStdArgs(Table table, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
table
- table to scan.scan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> double std(TableName tableName, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
tableName
- the name of the table to scanci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> double std(Table table, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
table
- table to scan.ci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.private <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> Pair<NavigableMap<byte[],List<S>>,List<S>> getMedianArgs(Table table, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
table
- table to scan.ci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> R median(TableName tableName, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
tableName
- the name of the table to scanci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.public <R,S,P extends com.google.protobuf.Message,Q extends com.google.protobuf.Message,T extends com.google.protobuf.Message> R median(Table table, ColumnInterpreter<R,S,P,Q,T> ci, Scan scan) throws Throwable
table
- table to scan.ci
- the user's ColumnInterpreter implementationscan
- the HBase scan object to use to read data from HBaseThrowable
- The caller is supposed to handle the exception as they are thrown
& propagated to it.byte[] getBytesFromResponse(com.google.protobuf.ByteString response)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.