From 3e75a6025d499f18fc4ebecc2740641718154b20 Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Thu, 3 May 2012 01:26:24 +0000 Subject: [PATCH] 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 --- .../java/org/apache/hadoop/hbase/catalog/MetaReader.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java b/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java index 238740a2688..c3c7de8c2ee 100644 --- a/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java +++ b/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java @@ -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);