druidry
druidry copied to clipboard
Support for querying Druid Asynchronously
Is it still open?
@patilvikram Its still open but we are not working on it as of now. We have other issues piled up before we pick this issue. If you want to help us we can discuss about it.
Yes, I think I can pick it up as we may require this feature soon enough. Could you please provide what you guys have discussed about this one?
has there been any update on this?
@patilvikram @nihit-zapr
No plans in near future. If we get more requests for this, we can prioritize it
I don't think it makes sense to implement it inside the library. It can be easily achieved using pure java code with much more flexibility:
public CompletableFuture<InputStream> sendQueryAsync(String druidQuery) {
HttpRequest request = HttpRequest.newBuilder(URI.create(brokerUrl))
.timeout(Duration.ofSeconds(requestTimeoutSeconds))
.header("Authorization", "Basic " + encodedCredentials)
.POST(HttpRequest.BodyPublishers.ofString(druidQuery))
.build();
return httpClient.sendAsync(request, HttpResponse.BodyHandlers.ofInputStream())
.thenApply(this::handleDruidResponse);
}