kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-2221: Log the real exception which triggered a reconnect
Date Fri, 29 Jan 2016 04:25:03 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 87eccb9a3 -> 8e8b9cade

KAFKA-2221: Log the real exception which triggered a reconnect

The commit here improves the logging in SimpleConsumer to log the real reason why a reconnect
was attempted. Relates to https://issues.apache.org/jira/browse/KAFKA-2221.

The same patch was submitted a while back but wasn't merged because SimpleConsumer was considered
deprecated and users' aren't expected to use it. However, more and more users in the user
mailing list are running into this log message but have no way to understand what the root
cause is. So IMO, this change still adds value  to such users who are using SimpleConsumer.

Author: Jaikiran Pai <jaikiran.pai@gmail.com>

Reviewers: Jiangjie Qin, Ismael Juma, Guozhang Wang

Closes #138 from jaikiran/kafka-2221

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

Branch: refs/heads/trunk
Commit: 8e8b9cadea0715882997bd5d1641a065f3997077
Parents: 87eccb9
Author: Jaikiran Pai <jaikiran.pai@gmail.com>
Authored: Thu Jan 28 20:24:58 2016 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Thu Jan 28 20:24:58 2016 -0800

 core/src/main/scala/kafka/consumer/SimpleConsumer.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/main/scala/kafka/consumer/SimpleConsumer.scala b/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
index e15aca4..e315678 100644
--- a/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
+++ b/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
@@ -91,7 +91,7 @@ class SimpleConsumer(val host: String,
         case e: AsynchronousCloseException =>
           throw e
         case e : Throwable =>
-          info("Reconnect due to socket error: %s".format(e.toString))
+          info("Reconnect due to error:", e)
           // retry once
           try {

View raw message