kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject svn commit: r1207642 - /incubator/kafka/trunk/core/src/main/scala/kafka/producer/SyncProducer.scala
Date Mon, 28 Nov 2011 21:53:13 GMT
Author: junrao
Date: Mon Nov 28 21:53:13 2011
New Revision: 1207642

URL: http://svn.apache.org/viewvc?rev=1207642&view=rev
Log:
SyncProducer should log host and port if can't connect; patched by Jun Rao; reviewed by Neha
Narkhede; KAFKA-214

Modified:
    incubator/kafka/trunk/core/src/main/scala/kafka/producer/SyncProducer.scala

Modified: incubator/kafka/trunk/core/src/main/scala/kafka/producer/SyncProducer.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/trunk/core/src/main/scala/kafka/producer/SyncProducer.scala?rev=1207642&r1=1207641&r2=1207642&view=diff
==============================================================================
--- incubator/kafka/trunk/core/src/main/scala/kafka/producer/SyncProducer.scala (original)
+++ incubator/kafka/trunk/core/src/main/scala/kafka/producer/SyncProducer.scala Mon Nov 28
21:53:13 2011
@@ -174,10 +174,10 @@ class SyncProducer(val config: SyncProdu
           val endTimeMs = SystemTime.milliseconds
           if ( (endTimeMs - beginTimeMs + connectBackoffMs) > config.connectTimeoutMs)
           {
-            error("Producer connection timing out after " + config.connectTimeoutMs + " ms",
e)
+            error("Producer connection to " +  config.host + ":" + config.port + " timing
out after " + config.connectTimeoutMs + " ms", e)
             throw e
           }
-          error("Connection attempt failed, next attempt in " + connectBackoffMs + " ms",
e)
+          error("Connection attempt to " +  config.host + ":" + config.port + " failed, next
attempt in " + connectBackoffMs + " ms", e)
           SystemTime.sleep(connectBackoffMs)
           connectBackoffMs = min(10 * connectBackoffMs, MaxConnectBackoffMs)
         }



Mime
View raw message