Reputation: 4139
I'd like to assure that data are stored in an HBase table at this very moment. I don't need the exact row count. For that I'm executing count 'table_name'
command twice in HBase shell:
hbase(main):001:0> count 'test_table', 100000
...
558549 row(s) in 360.1440 seconds
hbase(main):001:0> count 'test_table', 100000
...
558623 row(s) in 354.0270 seconds
But it takes too long when the row count is big(> 200,000).
What's the most efficient way to do that?
Upvotes: 0
Views: 858
Reputation: 10649
Try using the count command with a bigger cache value, I think the default one is 10
count 'test_table', CACHE => 1000
If it still too slow, you should try using the MapReduce Job
Run '$HADOOP_HOME/bin/hadoop jar hbase.jar rowcount'
Upvotes: 4