[
https://issues.apache.org/jira/browse/HIVE-26670?focusedWorklogId=821626&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-821626
]
ASF GitHub Bot logged work on HIVE-26670:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 28/Oct/22 22:47
Start Date: 28/Oct/22 22:47
Worklog Time Spent: 10m
Work Description: 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.
Issue Time Tracking
-------------------
Worklog Id: (was: 821626)
Time Spent: 2h 20m (was: 2h 10m)
> Track every single HTTP request between beeline and hs2
> -------------------------------------------------------
>
> Key: HIVE-26670
> URL: https://issues.apache.org/jira/browse/HIVE-26670
> Project: Hive
> Issue Type: Improvement
> Reporter: László Bodor
> Assignee: László Bodor
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> In my use-case there is a couple of layers between beeline and hs2 (load
> balancer, proxies), and I'm about to add something to the requests
> (optionally), that can be simply written to access logs in as many layers as
> possible.
> So instead of:
> {code}
> 2022-10-18T04:34:25+00:00 - [10.80.143.240, 10.80.143.240] - [hs2 host] - [-]
> "POST /cliservice HTTP/1.1" 200 1069 "-" "Java/THttpClient/HC" 703 0.008...
> {code}
> I want to see something specific to the request, which is generated on client
> side, so client can also log it.
> As the title suggests, I'm targeting http transport.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)