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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to