hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sachin Jain <sachinjain...@gmail.com>
Subject Default value of caching in Scanner
Date Tue, 01 Nov 2016 05:10:56 GMT
Hi,

I am using HBase v1.1.2. I have few questions regarding full table scan:-

1. When we instantiate a Scanner and do not set any caching on it. What is
the value it picks by default.
- By looking at the code, I have found the following:

>From documentation on the top in Scan.java class

* To modify scanner caching for just this scan, use {@link
#setCaching(int) setCaching}.
* If caching is NOT set, we will use the caching value of the hosting
{@link Table}.

And

/**
 * Set the number of rows for caching that will be passed to scanners.
 * If not set, the Configuration setting {@link
HConstants#HBASE_CLIENT_SCANNER_CACHING} will
 * apply.
 * Higher caching values will enable faster scanners but will use more memory.
 * @param caching the number of rows for caching
 */
public Scan setCaching(int caching) {
  this.caching = caching;
  return this;
}

And, default value in HConstants file is

public static final String HBASE_CLIENT_SCANNER_CACHING =
"hbase.client.scanner.caching";
public static final int DEFAULT_HBASE_CLIENT_SCANNER_CACHING = 2147483647;


Does that mean the default value viz number of records read per scan is
2147483647.
Can someone please clarify this ?

2. Another question is: I assume we have to set the caching value higher so
that we can reduce the number of RPC calls between client and region server.
So if we increase the caching value, should we also increase the RPC
timeout and scannerTimeout values otherwise we may reach that threshold for
the new cache value.

Thanks
-Sachin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message