diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java index 8c9271c..f3735a3 100644 --- a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java +++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java @@ -187,14 +187,12 @@ public void configureTableJobProperties( tableProperties.getProperty(HBaseSerDe.HBASE_COLUMNS_PREFIX_HIDE, "false")); jobProperties.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, tableProperties.getProperty(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE,"string")); + jobProperties.put(HBaseSerDe.HBASE_SCAN_CACHEBLOCKS, tableProperties + .getProperty(HBaseSerDe.HBASE_SCAN_CACHEBLOCKS, "false")); String scanCache = tableProperties.getProperty(HBaseSerDe.HBASE_SCAN_CACHE); if (scanCache != null) { jobProperties.put(HBaseSerDe.HBASE_SCAN_CACHE, scanCache); } - String scanCacheBlocks = tableProperties.getProperty(HBaseSerDe.HBASE_SCAN_CACHEBLOCKS); - if (scanCacheBlocks != null) { - jobProperties.put(HBaseSerDe.HBASE_SCAN_CACHEBLOCKS, scanCacheBlocks); - } String scanBatch = tableProperties.getProperty(HBaseSerDe.HBASE_SCAN_BATCH); if (scanBatch != null) { jobProperties.put(HBaseSerDe.HBASE_SCAN_BATCH, scanBatch); diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseInputFormatUtil.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseInputFormatUtil.java index bfcb1fa..e2a617b 100644 --- a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseInputFormatUtil.java +++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseInputFormatUtil.java @@ -140,10 +140,10 @@ public static Scan getScan(JobConf jobConf) throws IOException { if (scanCache != null) { scan.setCaching(Integer.parseInt(scanCache)); } - String scanCacheBlocks = jobConf.get(HBaseSerDe.HBASE_SCAN_CACHEBLOCKS); - if (scanCacheBlocks != null) { - scan.setCacheBlocks(Boolean.parseBoolean(scanCacheBlocks)); - } + + String scanCacheBlocks = jobConf.get(HBaseSerDe.HBASE_SCAN_CACHEBLOCKS, "false"); + scan.setCacheBlocks(Boolean.parseBoolean(scanCacheBlocks)); + String scanBatch = jobConf.get(HBaseSerDe.HBASE_SCAN_BATCH); if (scanBatch != null) { scan.setBatch(Integer.parseInt(scanBatch));