HBASE-5913 Speed up the full scan of META (Chunhui)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1333283 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2012-05-03 01:26:24 +00:00
parent 3ca70cc5b1
commit 3e75a6025d
1 changed files with 5 additions and 0 deletions

View File

@ -609,6 +609,11 @@ public class MetaReader {
throws IOException {
Scan scan = new Scan();
if (startrow != null) scan.setStartRow(startrow);
if (startrow == null && !scanRoot) {
int caching = catalogTracker.getConnection().getConfiguration()
.getInt(HConstants.HBASE_META_SCANNER_CACHING, 100);
scan.setCaching(caching);
}
scan.addFamily(HConstants.CATALOG_FAMILY);
HTable metaTable = scanRoot?
getRootHTable(catalogTracker): getMetaHTable(catalogTracker);