SyncProducer should log host and port if can't connect; patched by Jun Rao; reviewed by Neha Narkhede; KAFKA-214

git-svn-id: https://svn.apache.org/repos/asf/incubator/kafka/trunk@1207642 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jun Rao 2011-11-28 21:53:13 +00:00
parent c65e771d47
commit cb2564c45e
1 changed files with 2 additions and 2 deletions

View File

@ -174,10 +174,10 @@ class SyncProducer(val config: SyncProducerConfig) extends Logging {
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)
}