kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: MINOR: Add more info to RecordCollector error message
Date Fri, 05 Feb 2016 20:58:40 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 40df94af5 -> fa05ee727


MINOR: Add more info to RecordCollector error message

guozhangwang

Author: Yasuhiro Matsuda <yasuhiro@confluent.io>

Reviewers: Grant Henke <granthenke@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #873 from ymatsuda/hotfix


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/fa05ee72
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/fa05ee72
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/fa05ee72

Branch: refs/heads/trunk
Commit: fa05ee727960257ec4b9aa92e1b46348a5450cf4
Parents: 40df94a
Author: Yasuhiro Matsuda <yasuhiro@confluent.io>
Authored: Fri Feb 5 12:58:14 2016 -0800
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Fri Feb 5 12:58:14 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/kafka/clients/producer/RecordMetadata.java  | 5 +++++
 .../kafka/streams/processor/internals/RecordCollector.java      | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/fa05ee72/clients/src/main/java/org/apache/kafka/clients/producer/RecordMetadata.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/clients/producer/RecordMetadata.java b/clients/src/main/java/org/apache/kafka/clients/producer/RecordMetadata.java
index 8015f0d..a80f6b9 100644
--- a/clients/src/main/java/org/apache/kafka/clients/producer/RecordMetadata.java
+++ b/clients/src/main/java/org/apache/kafka/clients/producer/RecordMetadata.java
@@ -58,4 +58,9 @@ public final class RecordMetadata {
     public int partition() {
         return this.topicPartition.partition();
     }
+
+    @Override
+    public String toString() {
+        return topicPartition.toString() + "@" + offset;
+    }
 }

http://git-wip-us.apache.org/repos/asf/kafka/blob/fa05ee72/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollector.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollector.java
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollector.java
index fe0472e..2943ead 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollector.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollector.java
@@ -56,7 +56,7 @@ public class RecordCollector {
                 TopicPartition tp = new TopicPartition(metadata.topic(), metadata.partition());
                 offsets.put(tp, metadata.offset());
             } else {
-                log.error("Error sending record: ", exception);
+                log.error("Error sending record: " + metadata, exception);
             }
         }
     };


Mime
View raw message