philipjkim
philipjkim

Reputation: 4139

What's the most efficient way to assure the row counts are increased in an HBase table at this very moment?

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

Answers (1)

Jean-Philippe Bond
Jean-Philippe Bond

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

Related Questions