方式一:
count "表名",INTERVAL=>1000
example : count "fk:user"
INTERVAL是统计的间隔,默认是1000
方式二:
hbase org.apache.hadoop.hbase.mapreduce.RowCounter "表名"
这种方式效率比上一种要搞很多,调用的hbase jar中自带的统计行数的类
方式三:
如果hbase的表是和hive是关联的话,可以直接的在hive里面使用 select count(*) form 表:的sql语句来计算。
参考:https://blog.csdn.net/u013709332/article/details/52296748/
网友评论