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

bbejeck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1669b77  KAFKA-8501: Removing key and value from exception message 
(#6904)
1669b77 is described below

commit 1669b773ba31f7bb3395ec536be7c17bc98ab9fc
Author: Carlos Manuel Duclos Vergara <[email protected]>
AuthorDate: Tue Jun 11 16:04:44 2019 +0200

    KAFKA-8501: Removing key and value from exception message (#6904)
    
    Messages containing key and value were moved to the TRACE logging level, 
however the exception is still adding the key and value.
    This commits remove the key and value from StreamsException.
    
    Reviewers: Bill Bejeck <[email protected]>
---
 .../kafka/streams/processor/internals/RecordCollectorImpl.java    | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git 
a/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollectorImpl.java
 
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollectorImpl.java
index 2e9ead8..4edbc3d 100644
--- 
a/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollectorImpl.java
+++ 
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollectorImpl.java
@@ -58,7 +58,7 @@ public class RecordCollectorImpl implements RecordCollector {
     private final static String LOG_MESSAGE = "Error sending record to topic 
{} due to {}; " +
         "No more records will be sent and no more offsets will be recorded for 
this task. " +
         "Enable TRACE logging to view failed record key and value.";
-    private final static String EXCEPTION_MESSAGE = "%sAbort sending since %s 
with a previous record (key %s value %s timestamp %d) to topic %s due to %s";
+    private final static String EXCEPTION_MESSAGE = "%sAbort sending since %s 
with a previous record (timestamp %d) to topic %s due to %s";
     private final static String PARAMETER_HINT = "\nYou can increase producer 
parameter `retries` and `retry.backoff.ms` to avoid this error.";
     private volatile KafkaException sendException;
 
@@ -139,8 +139,6 @@ public class RecordCollectorImpl implements RecordCollector 
{
                 errorMessage,
                 logPrefix,
                 "an error caught",
-                key,
-                value,
                 timestamp,
                 topic,
                 exception.toString()
@@ -187,8 +185,6 @@ public class RecordCollectorImpl implements RecordCollector 
{
                                         EXCEPTION_MESSAGE,
                                         logPrefix,
                                         "producer got fenced",
-                                        key,
-                                        value,
                                         timestamp,
                                         topic,
                                         exception.toString()
@@ -245,8 +241,6 @@ public class RecordCollectorImpl implements RecordCollector 
{
                         EXCEPTION_MESSAGE,
                         logPrefix,
                         "an error caught",
-                        key,
-                        value,
                         timestamp,
                         topic,
                         uncaughtException.toString()

Reply via email to