You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/01/12 17:32:39 UTC

[GitHub] [hive] belugabehr commented on a change in pull request #1859: HIVE-24627: Add Debug Logging to Hive JDBC Connection

belugabehr commented on a change in pull request #1859:
URL: https://github.com/apache/hive/pull/1859#discussion_r555950877



##########
File path: jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java
##########
@@ -874,17 +881,21 @@ private void openSession() throws SQLException {
     }
 
     // set the session configuration
-    if (sessConfMap.containsKey(HiveAuthConstants.HS2_PROXY_USER)) {
-      openConf.put(HiveAuthConstants.HS2_PROXY_USER,
-          sessConfMap.get(HiveAuthConstants.HS2_PROXY_USER));
+    final String hs2ProxyUser = sessConfMap.get(HiveAuthConstants.HS2_PROXY_USER);
+    if (hs2ProxyUser != null) {
+      LOG.debug("Set hive.server2.proxy.user: {}", hs2ProxyUser);
+      openConf.put(HiveAuthConstants.HS2_PROXY_USER, hs2ProxyUser);
     }
 
     // set create external purge table by default
     if (sessConfMap.containsKey(JdbcConnectionParams.CREATE_TABLE_AS_EXTERNAL)) {
       openConf.put("set:hiveconf:hive.create.as.external.legacy",
           sessConfMap.get(JdbcConnectionParams.CREATE_TABLE_AS_EXTERNAL).toLowerCase());
     }
-    if (isHplSqlMode()) {
+

Review comment:
       Ya.  I wanted to log them differently since they have different sources (and I wanted to preserve the source), but I guess it uses `set:hiveconf` `set:hivevar` in the key property so the source will be known.  Thanks. Changed.
   
   I did keep the 'table name' since that is just all around useful information that I wouldn't want to go digging for in the big configuration map.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org