diff --git a/processing/src/main/java/io/druid/query/QueryInterruptedException.java b/processing/src/main/java/io/druid/query/QueryInterruptedException.java index 4ca01358787..29ea3f0ac63 100644 --- a/processing/src/main/java/io/druid/query/QueryInterruptedException.java +++ b/processing/src/main/java/io/druid/query/QueryInterruptedException.java @@ -21,6 +21,7 @@ package io.druid.query; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import io.druid.java.util.common.StringUtils; import java.util.concurrent.CancellationException; import java.util.concurrent.TimeoutException; @@ -109,6 +110,18 @@ public class QueryInterruptedException extends RuntimeException return host; } + @Override + public String toString() + { + return StringUtils.format( + "QueryInterruptedException{msg=%s, code=%s, class=%s, host=%s}", + getMessage(), + errorCode, + errorClass, + host + ); + } + private static String getErrorCodeFromThrowable(Throwable e) { if (e instanceof QueryInterruptedException) {