1、hbase 行计数方法一:
//行计数
public static long rowCount(String tableName) {
long rowCount = 0;
@SuppressWarnings("resource")
AggregationClient aggregationClient = new AggregationClient(conf);
Scan scan = new Scan();
try {
rowCount = aggregationClient.rowCount(TableName.valueOf(tableName),
new LongColumnInterpreter(), scan);
} catch (Throwable e) {
e.printStackTrace();
}
return rowCount;
}