Reply
GGJ
New Contributor
Posts: 3
Registered: ‎03-02-2015

Why HTableInterface::getScanner takes long time

I am using version 0.94.2-cdh4.2.1 of HBase. My use case is that of a KV store where I put keys with values(key being the row key, values are put as column in single column family). I find that the getScanner method of HTableInterface takes a long time. I have hbase.regionserver.handler.count set as 250. The requests per second on the server can range from 500-2000 per second. Any suggestion what configuration of hbase needs to be tuned/modified to make the getScanner call faster?

 

HTableInterface table = hTablePoolManager.getTable(tableName);
    Scan scan = new Scan(Bytes.toBytes(key), Bytes.toBytes(key));

    for (String column : columns) {
        scan.addColumn(ColumnFamily.cf0.toString().getBytes(), column.getBytes());
    }

    Result result = null;
    try {
        ResultScanner resultScanner = table.getScanner(scan);
Posts: 1,892
Kudos: 432
Solutions: 302
Registered: ‎07-31-2013

Re: Why HTableInterface::getScanner takes long time

We've made several general improvements to scan perf. in CDH5. Please consider upgrading.

As to why your scanner fetches may be slow, there could be a variety of reasons. Is your RS RPC call queue almost always filling/spiking? Are your regions well compacted regularly, and have only a few store files?
Announcements