cgivre commented on code in PR #2650:
URL: https://github.com/apache/drill/pull/2650#discussion_r973642898
##########
contrib/storage-druid/src/main/java/org/apache/drill/exec/store/druid/rest/DruidQueryClient.java:
##########
@@ -48,20 +48,21 @@ public DruidQueryClient(String brokerURI, RestClient
restClient) {
public DruidScanResponse executeQuery(String query) throws Exception {
logger.debug("Executing Query - {}", query);
- HttpResponse response = restClient.post(queryUrl, query);
- if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
- throw UserException
- .dataReadError()
- .message("Error executing druid query. HTTP request failed")
- .addContext("Response code",
response.getStatusLine().getStatusCode())
- .addContext("Response message",
response.getStatusLine().getReasonPhrase())
- .build(logger);
- }
+ try (Response response = restClient.post(queryUrl, query)) {
+ if (!response.isSuccessful()) {
+ throw UserException
Review Comment:
Ahh... you're right. In that case, would you please put some `TODO`
comments in the rest clients and then we can update once the EVF conversion is
done?
--
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]