I am testing performance using Google Cloud Bigtable with a table with 10M rows using the Java HBase API client. For the following commands the performance is relatively fast
Scan scan = new Scan()
ResultScanner scanner = table.getScanner(scan);
(1e-3, or 1e-2 second range)
However when I use the foreach loop to get the contents of the row from the iterable:
for (Result row : scanner) {
byte[] valueBytes = row.getRow();
(The above commands are generic as I'm pretty sure I used the correct rowkey filtering methods, as well as accounting for regions/tablets)
The row.getRow()/ row.getValue() is super fast
However, traversing the ResultScanner is super slow (like > 30 seconds)
I've been reading in the docs that using setCaching() should help speed things up, however according to Google Cloud Bigtable docs setCaching() is not implemented. From the docs it reads:
org.apache.hadoop.hbase.client.Scan#setCaching(int caching) are ignored
My question is how can I increase speeds to read actual content from row objects (especially when traversing rows)?