druidry icon indicating copy to clipboard operation
druidry copied to clipboard

Support for querying Druid Asynchronously

Open GG-Zapr opened this issue 6 years ago • 7 comments

GG-Zapr avatar Apr 13 '18 14:04 GG-Zapr

Is it still open?

patilvikram avatar Oct 03 '18 06:10 patilvikram

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

nihit-zapr avatar Oct 05 '18 06:10 nihit-zapr

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?

patilvikram avatar Oct 11 '18 09:10 patilvikram

has there been any update on this?

moezubair avatar Jan 15 '19 16:01 moezubair

@patilvikram @nihit-zapr

moezubair avatar Jan 24 '19 14:01 moezubair

No plans in near future. If we get more requests for this, we can prioritize it

GG-Zapr avatar Jan 24 '19 16:01 GG-Zapr

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);
    }

chrisociepa avatar Mar 23 '20 16:03 chrisociepa