From 2086ff88bcdbfdba507d52d78bd3c7605beab280 Mon Sep 17 00:00:00 2001 From: Rishabh Singh <6513075+findingrish@users.noreply.github.com> Date: Tue, 30 May 2023 18:50:52 +0530 Subject: [PATCH] Add logging for task stop operations (#14192) Log more details when task cannot be stopped for various reasons --- .../SeekableStreamIndexTaskClientAsyncImpl.java | 12 +++++++++--- .../SeekableStreamIndexTaskClientSyncImpl.java | 11 ++++++++++- .../indexing/worker/executor/ExecutorLifecycle.java | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientAsyncImpl.java b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientAsyncImpl.java index f124ca25ca4..2051d807b11 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientAsyncImpl.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientAsyncImpl.java @@ -145,10 +145,16 @@ public abstract class SeekableStreamIndexTaskClientAsyncImpl 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 [%s].", id, e.getMessage()); + return Either.value(false); + }) + .onNotAvailable(e -> { + log.warn("Task [%s] coundln't be stopped because it is not available.", id); + return Either.value(false); + }) .onClosed(e -> { - log.debug("Task [%s] couldn't be stopped because it is no longer running.", id); + log.warn("Task [%s] couldn't be stopped because it is no longer running.", id); return Either.value(true); }) .go(); diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientSyncImpl.java b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientSyncImpl.java index 9f01a6f8c95..971908ac7dd 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientSyncImpl.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientSyncImpl.java @@ -85,7 +85,16 @@ public abstract class SeekableStreamIndexTaskClientSyncImpl