20,808
社区成员
发帖
与我相关
我的任务
分享
final Scan scan = query.getScan(appName, key1, key2, key3, start, stop, hostName);
scan.addColumn(TspHbaseStatics.MONITLOG_FAMILY, TspHbaseStatics.MONITLOG_Q_V1);
AggregationClient ac = new AggregationClient(dao.getConfiguration());
LongColumnInterpreter ci = new LongColumnInterpreter();
final Long v1 = ac.sum(TableName.valueOf("MonitorLog201405"), ci, scan);
// final Long v1 = ac.rowCount(TableName.valueOf("MonitorLog201405"), ci, scan);
<property>
<name>hbase.coprocessor.user.region.classes</name>
<value>org.apache.hadoop.hbase.coprocessor.AggregateImplementation</value>
</property>