cnauroth commented on code in PR #3710:
URL: https://github.com/apache/hive/pull/3710#discussion_r1008560747


##########
jdbc/src/java/org/apache/hive/jdbc/HttpRequestInterceptorBase.java:
##########
@@ -99,7 +118,20 @@ public void process(HttpRequest httpRequest, HttpContext 
httpContext)
         httpRequest.addHeader("Cookie", cookieHeaderKeyValues);
       }
     } catch (Exception e) {
-      throw new HttpException(e.getMessage(), e);
+      throw new RuntimeException(e);

Review Comment:
   What is the reason for changing the exception type?



##########
jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java:
##########
@@ -813,6 +818,22 @@ RegistryBuilder.<ConnectionSocketFactory> 
create().register("https", socketFacto
     return httpClientBuilder.build();
   }
 
+  private boolean isRequestTrackingEnabled() {
+    return 
Boolean.valueOf(sessConfMap.get(JdbcConnectionParams.JDBC_PARAM_REQUEST_TRACK));
+  }
+
+  private Supplier<String> getSessionId() {

Review Comment:
   I just realized that this could potentially be simplified to avoid using a 
`Supplier`, e.g. `requestInterceptor.setSessionId(getSessionId())`, where 
`getSessionId()` immediately does the concatenation and returns `String`. Is 
the logic behind a `Supplier` because it's potentially expensive for users who 
don't want to enable request tracking? If so, then it would be good to add a 
comment explaining that.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to