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 15:42:52 UTC

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

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



##########
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:
       I'd suggest to log out in debug level the whole oponeconf right before opening the session, instead of having a log.debug next to each set command, in a similar fashion as you log out the serverHiveConf after it is opened.




----------------------------------------------------------------
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