You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jd...@apache.org on 2016/05/03 03:37:22 UTC
[05/50] [abbrv] hive git commit: HIVE-13645 : Beeline needs
null-guard around hiveVars and hiveConfVars read (Sushanth Sowmyan,
reviewed by Thejas Nair)
HIVE-13645 : Beeline needs null-guard around hiveVars and hiveConfVars read (Sushanth Sowmyan, reviewed by Thejas Nair)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/4b5f0d96
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/4b5f0d96
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/4b5f0d96
Branch: refs/heads/llap
Commit: 4b5f0d963e8e759856437eb641d35bd4ce3c38f7
Parents: 2abea8e
Author: Sushanth Sowmyan <kh...@gmail.com>
Authored: Mon May 2 12:09:09 2016 -0700
Committer: Sushanth Sowmyan <kh...@gmail.com>
Committed: Mon May 2 12:09:09 2016 -0700
----------------------------------------------------------------------
.../org/apache/hive/beeline/DatabaseConnection.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/4b5f0d96/beeline/src/java/org/apache/hive/beeline/DatabaseConnection.java
----------------------------------------------------------------------
diff --git a/beeline/src/java/org/apache/hive/beeline/DatabaseConnection.java b/beeline/src/java/org/apache/hive/beeline/DatabaseConnection.java
index c4afa0a..a38d904 100644
--- a/beeline/src/java/org/apache/hive/beeline/DatabaseConnection.java
+++ b/beeline/src/java/org/apache/hive/beeline/DatabaseConnection.java
@@ -127,13 +127,17 @@ class DatabaseConnection {
}
Map<String, String> hiveVars = beeLine.getOpts().getHiveVariables();
- for (Map.Entry<String, String> var : hiveVars.entrySet()) {
- info.put(HIVE_VAR_PREFIX + var.getKey(), var.getValue());
+ if (hiveVars != null){
+ for (Map.Entry<String, String> var : hiveVars.entrySet()) {
+ info.put(HIVE_VAR_PREFIX + var.getKey(), var.getValue());
+ }
}
Map<String, String> hiveConfVars = beeLine.getOpts().getHiveConfVariables();
- for (Map.Entry<String, String> var : hiveConfVars.entrySet()) {
- info.put(HIVE_CONF_PREFIX + var.getKey(), var.getValue());
+ if (hiveConfVars != null){
+ for (Map.Entry<String, String> var : hiveConfVars.entrySet()) {
+ info.put(HIVE_CONF_PREFIX + var.getKey(), var.getValue());
+ }
}
if (isDriverRegistered) {