hadoop - Hbase quickly count number of rows -


right implement row count on resultscanner this

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

if data reaching millions time computing large.i want compute in real time don't want use mapreduce

how count number of rows.

use rowcounter in hbase rowcounter mapreduce job count rows of table. utility use sanity check ensure hbase can read blocks of table if there concerns of metadata inconsistency. run mapreduce in single process run faster if have mapreduce cluster in place exploit.

$ hbase org.apache.hadoop.hbase.mapreduce.rowcounter <tablename> usage: rowcounter [options] <tablename> [ --starttime=[start] --endtime=[end] [--range=[startkey],[endkey]] [<column1> <column2>...] ] 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

c++ - Accessing inactive union member and undefined behavior? -

php - Get uncommon values from two or more arrays -