This is an automated email from the ASF dual-hosted git repository.

frankchen pushed a commit to branch kafka_configuration
in repository https://gitbox.apache.org/repos/asf/druid.git

commit 7102d91c7d91f409832789e75412c58787db526b
Author: frank chen <[email protected]>
AuthorDate: Sun Oct 17 21:00:00 2021 +0800

    Resolve comments
---
 .../druid/indexing/overlord/sampler/SamplerExceptionMapper.java       | 4 ++--
 .../druid/indexing/seekablestream/SeekableStreamSamplerSpec.java      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/indexing-service/src/main/java/org/apache/druid/indexing/overlord/sampler/SamplerExceptionMapper.java
 
b/indexing-service/src/main/java/org/apache/druid/indexing/overlord/sampler/SamplerExceptionMapper.java
index a35fff6..93eda85 100644
--- 
a/indexing-service/src/main/java/org/apache/druid/indexing/overlord/sampler/SamplerExceptionMapper.java
+++ 
b/indexing-service/src/main/java/org/apache/druid/indexing/overlord/sampler/SamplerExceptionMapper.java
@@ -37,8 +37,8 @@ public class SamplerExceptionMapper implements 
ExceptionMapper<SamplerException>
     String message = exception.getMessage() == null ? "The sampler encountered 
an issue" : exception.getMessage();
 
     // stack trace is not returned to the client,
-    // so the cause of the exception should be logged so that we know where 
the exception is thrown
-    LOG.error(exception.getCause(), message);
+    // so the exception should be logged so that we know where the exception 
is thrown
+    LOG.error(exception, message);
 
     return Response.status(Response.Status.BAD_REQUEST)
                    .entity(ImmutableMap.of(
diff --git 
a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamSamplerSpec.java
 
b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamSamplerSpec.java
index bec3ea2..eb69cab 100644
--- 
a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamSamplerSpec.java
+++ 
b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamSamplerSpec.java
@@ -100,9 +100,9 @@ public abstract class 
SeekableStreamSamplerSpec<PartitionIdType, SequenceOffsetT
       }
       catch (Exception e) {
         if (e.getCause() != null) {
-          throw new SamplerException(e, "Unable to sample data: %s. Cause: 
%s", e.getMessage(), e.getCause().getMessage());
+          throw new SamplerException(e, "Unable to create RecordSupplier: %s. 
Cause: %s", e.getMessage(), e.getCause().getMessage());
         } else {
-          throw new SamplerException(e, "Unable to sample data: %s", 
e.getMessage());
+          throw new SamplerException(e, "Unable to create RecordSupplier: %s", 
e.getMessage());
         }
       }
 

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

Reply via email to