You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "abhishekagarwal87 (via GitHub)" <gi...@apache.org> on 2023/05/22 06:34:26 UTC
[GitHub] [druid] abhishekagarwal87 commented on a diff in pull request #14192: Add logging for task stop operations
abhishekagarwal87 commented on code in PR #14192:
URL: https://github.com/apache/druid/pull/14192#discussion_r1199045978
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientAsyncImpl.java:
##########
@@ -145,10 +145,16 @@ public ListenableFuture<Boolean> stopAsync(final String id, final boolean publis
{
return makeRequest(id, new RequestBuilder(HttpMethod.POST, "/stop" + (publish ? "?publish=true" : "")))
.onSuccess(r -> true)
- .onHttpError(e -> Either.value(false))
- .onNotAvailable(e -> Either.value(false))
+ .onHttpError(e -> {
+ log.warn("Task [%s] coundln't be stopped because of http request failure.", id);
Review Comment:
we also want to log what this failure was. is it something that e.getMessage will have?
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientAsyncImpl.java:
##########
@@ -145,10 +145,16 @@ public ListenableFuture<Boolean> stopAsync(final String id, final boolean publis
{
return makeRequest(id, new RequestBuilder(HttpMethod.POST, "/stop" + (publish ? "?publish=true" : "")))
.onSuccess(r -> true)
- .onHttpError(e -> Either.value(false))
- .onNotAvailable(e -> Either.value(false))
+ .onHttpError(e -> {
+ log.warn("Task [%s] coundln't be stopped because of http request failure.", id);
+ return Either.value(false);
+ })
+ .onNotAvailable(e -> {
+ log.warn("Task [%s] coundln't be stopped because it is not available.", id);
Review Comment:
what does being "not available" exactly mean here? The task port is not reachable?
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org