kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject git commit: kafka-1352; Reduce logging on the server; patched by Ivan Lyutovg; reviewed by Guozhang Wang and Jun Rao
Date Wed, 09 Apr 2014 00:57:08 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 69655d5fb -> a39f2c18c


kafka-1352; Reduce logging on the server; patched by Ivan Lyutovg; reviewed by Guozhang Wang
and Jun Rao


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

Branch: refs/heads/trunk
Commit: a39f2c18c027708ff5830a81c1263c6ebb073445
Parents: 69655d5
Author: Ivan Lyutov <ivanlyutov@gmail.com>
Authored: Tue Apr 8 17:56:59 2014 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Tue Apr 8 17:56:59 2014 -0700

----------------------------------------------------------------------
 .../main/scala/kafka/consumer/ZookeeperConsumerConnector.scala | 2 +-
 core/src/main/scala/kafka/server/AbstractFetcherThread.scala   | 2 +-
 core/src/main/scala/kafka/server/KafkaApis.scala               | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/a39f2c18/core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala b/core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala
index ff5e819..1dde4fc 100644
--- a/core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala
+++ b/core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala
@@ -435,7 +435,7 @@ private[kafka] class ZookeeperConsumerConnector(val config: ConsumerConfig,
           }
           catch {
             case e: Exception =>
-              error("Error while fetching offsets from %s:%d.".format(offsetsChannel.host,
offsetsChannel.port), e)
+              warn("Error while fetching offsets from %s:%d. Possible cause: %s".format(offsetsChannel.host,
offsetsChannel.port, e.getMessage))
               offsetsChannel.disconnect()
               None // retry
           }

http://git-wip-us.apache.org/repos/asf/kafka/blob/a39f2c18/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/AbstractFetcherThread.scala b/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
index db7017b..3b15254 100644
--- a/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
+++ b/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
@@ -97,7 +97,7 @@ abstract class AbstractFetcherThread(name: String, clientId: String, sourceBroke
     } catch {
       case t: Throwable =>
         if (isRunning.get) {
-          error("Error in fetch %s".format(fetchRequest), t)
+          warn("Error in fetch %s. Possible cause: %s".format(fetchRequest, t.getMessage))
           partitionMapLock synchronized {
             partitionsWithError ++= partitionMap.keys
           }

http://git-wip-us.apache.org/repos/asf/kafka/blob/a39f2c18/core/src/main/scala/kafka/server/KafkaApis.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/KafkaApis.scala b/core/src/main/scala/kafka/server/KafkaApis.scala
index 4e11785..d96229e 100644
--- a/core/src/main/scala/kafka/server/KafkaApis.scala
+++ b/core/src/main/scala/kafka/server/KafkaApis.scala
@@ -517,8 +517,8 @@ class KafkaApis(val requestChannel: RequestChannel,
             case t: Throwable =>
               BrokerTopicStats.getBrokerTopicStats(topic).failedFetchRequestRate.mark()
               BrokerTopicStats.getBrokerAllTopicsStats.failedFetchRequestRate.mark()
-              error("Error when processing fetch request for partition [%s,%d] offset %d
from %s with correlation id %d"
-                    .format(topic, partition, offset, if (isFetchFromFollower) "follower"
else "consumer", fetchRequest.correlationId), t)
+              error("Error when processing fetch request for partition [%s,%d] offset %d
from %s with correlation id %d. Possible cause: %s"
+                    .format(topic, partition, offset, if (isFetchFromFollower) "follower"
else "consumer", fetchRequest.correlationId, t.getMessage))
               new FetchResponsePartitionData(ErrorMapping.codeFor(t.getClass.asInstanceOf[Class[Throwable]]),
-1L, MessageSet.Empty)
           }
         (TopicAndPartition(topic, partition), partitionData)
@@ -694,7 +694,7 @@ class KafkaApis(val requestChannel: RequestChannel,
                 new PartitionMetadata(partitionId, leaderInfo, replicaInfo, isrInfo, ErrorMapping.NoError)
               } catch {
                 case e: Throwable =>
-                  error("Error while fetching metadata for topic %s partition %s".format(topic,
partitionId), e)
+                  debug("Error while fetching metadata for topic %s partition %s. Possible
cause: %s".format(topic, partitionId, e.getMessage))
                   new PartitionMetadata(partitionId, leaderInfo, replicaInfo, isrInfo,
                     ErrorMapping.codeFor(e.getClass.asInstanceOf[Class[Throwable]]))
               }


Mime
View raw message