This is an automated email from the ASF dual-hosted git repository.

hashutosh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f7f5d1  HIVE-21538 : Beeline: password source though the console 
reader did not pass to connection param (Rajkumar Singh via Thejas Nair)
8f7f5d1 is described below

commit 8f7f5d17a7c8bcdd6b019f822c98c2ecb1bba735
Author: Rajkumar Singh <rajkumar.si...@hortonworks.com>
AuthorDate: Wed Apr 17 11:13:50 2019 -0700

    HIVE-21538 : Beeline: password source though the console reader did not 
pass to connection param (Rajkumar Singh via Thejas Nair)
    
    Signed-off-by: Ashutosh Chauhan <hashut...@apache.org>
---
 jdbc/src/java/org/apache/hive/jdbc/Utils.java | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/jdbc/src/java/org/apache/hive/jdbc/Utils.java 
b/jdbc/src/java/org/apache/hive/jdbc/Utils.java
index e0200b7..3c18f09 100644
--- a/jdbc/src/java/org/apache/hive/jdbc/Utils.java
+++ b/jdbc/src/java/org/apache/hive/jdbc/Utils.java
@@ -454,6 +454,17 @@ public class Utils {
       }
     }
 
+    if 
(!connParams.getSessionVars().containsKey(JdbcConnectionParams.AUTH_PASSWD)) {
+      if (info.containsKey(JdbcConnectionParams.AUTH_USER)) {
+        connParams.getSessionVars().put(JdbcConnectionParams.AUTH_USER,
+                info.getProperty(JdbcConnectionParams.AUTH_USER));
+      }
+      if (info.containsKey(JdbcConnectionParams.AUTH_PASSWD)) {
+        connParams.getSessionVars().put(JdbcConnectionParams.AUTH_PASSWD,
+                info.getProperty(JdbcConnectionParams.AUTH_PASSWD));
+      }
+    }
+
     if (info.containsKey(JdbcConnectionParams.AUTH_TYPE)) {
       connParams.getSessionVars().put(JdbcConnectionParams.AUTH_TYPE,
           info.getProperty(JdbcConnectionParams.AUTH_TYPE));

Reply via email to