Hbase quickly count number of rows

前端 未结 12 1585
轮回少年
轮回少年 2020-12-04 13:25

Right now I implement row count over ResultScanner like this

for (Result rs = scanner.next(); rs != null; rs = scanner.next()) {
    number++;
}         


        
12条回答
  •  旧时难觅i
    2020-12-04 13:36

    To count the Hbase table record count on a proper YARN cluster you have to set the map reduce job queue name as well:

    hbase org.apache.hadoop.hbase.mapreduce.RowCounter -Dmapreduce.job.queuename= < Your Q Name which you have SUBMIT access>
     < TABLE_NAME>
    

提交回复
热议问题