kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject svn commit: r1350046 - /incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/async/DefaultEventHandler.scala
Date Wed, 13 Jun 2012 22:36:20 GMT
Author: junrao
Date: Wed Jun 13 22:36:20 2012
New Revision: 1350046

URL: http://svn.apache.org/viewvc?rev=1350046&view=rev
Log:
trivial change to add some logging info in DefaultEventHandler

Modified:
    incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/async/DefaultEventHandler.scala

Modified: incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/async/DefaultEventHandler.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/async/DefaultEventHandler.scala?rev=1350046&r1=1350045&r2=1350046&view=diff
==============================================================================
--- incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/async/DefaultEventHandler.scala
(original)
+++ incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/async/DefaultEventHandler.scala
Wed Jun 13 22:36:20 2012
@@ -162,6 +162,7 @@ class DefaultEventHandler[K,V](config: P
    */
   private def send(brokerId: Int, messagesPerTopic: Map[(String, Int), ByteBufferMessageSet]):
Seq[(String, Int)] = {
     if(brokerId < 0) {
+      warn("failed to send to broker %d with data %s".format(brokerId, messagesPerTopic))
       messagesPerTopic.keys.toSeq
     } else if(messagesPerTopic.size > 0) {
       val topics = new HashMap[String, ListBuffer[PartitionData]]()
@@ -185,7 +186,9 @@ class DefaultEventHandler[K,V](config: P
         }
         errors
       } catch {
-        case e => messagesPerTopic.keys.toSeq
+        case e =>
+          warn("failed to send to broker %d with data %s".format(brokerId, messagesPerTopic),
e)
+          messagesPerTopic.keys.toSeq
       }
     } else {
       List.empty



Mime
View raw message