You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ng...@apache.org on 2019/01/31 16:50:39 UTC
[hive] branch branch-3 updated: HIVE-20484: Disable Block Cache By
Default With HBase SerDe (Beluga Behr,
reviewed by Prashant J and Naveen Gangam)
This is an automated email from the ASF dual-hosted git repository.
ngangam pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/branch-3 by this push:
new e2a17a5 HIVE-20484: Disable Block Cache By Default With HBase SerDe (Beluga Behr, reviewed by Prashant J and Naveen Gangam)
e2a17a5 is described below
commit e2a17a5666facc94484f6b566fa1d25bc89051e7
Author: Naveen Gangam <ng...@apache.org>
AuthorDate: Thu Jan 31 11:32:08 2019 -0500
HIVE-20484: Disable Block Cache By Default With HBase SerDe (Beluga Behr, reviewed by Prashant J and Naveen Gangam)
---
.../java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java | 6 ++----
.../org/apache/hadoop/hive/hbase/HiveHBaseInputFormatUtil.java | 9 +++++----
2 files changed, 7 insertions(+), 8 deletions(-)
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 class HBaseStorageHandler extends DefaultStorageHandler
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 8b73bfb..bba9091 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,11 @@ class HiveHBaseInputFormatUtil {
if (scanCache != null) {
scan.setCaching(Integer.parseInt(scanCache));
}
- String scanCacheBlocks = jobConf.get(HBaseSerDe.HBASE_SCAN_CACHEBLOCKS);
- if (scanCacheBlocks != null) {
- scan.setCacheBlocks(Boolean.parseBoolean(scanCacheBlocks));
- }
+
+ boolean scanCacheBlocks =
+ jobConf.getBoolean(HBaseSerDe.HBASE_SCAN_CACHEBLOCKS, false);
+ scan.setCacheBlocks(scanCacheBlocks);
+
String scanBatch = jobConf.get(HBaseSerDe.HBASE_SCAN_BATCH);
if (scanBatch != null) {
scan.setBatch(Integer.parseInt(scanBatch));