kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nehanarkh...@apache.org
Subject kafka git commit: KAFKA-1886 SimpleConsumer swallowing ClosedByInterruptException; reviewed by Neha Narkhede
Date Mon, 04 May 2015 18:54:41 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 161b1aa16 -> e40ebcff6


KAFKA-1886 SimpleConsumer swallowing ClosedByInterruptException; reviewed by Neha Narkhede


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

Branch: refs/heads/trunk
Commit: e40ebcff6a7da483b5b748053b223a2012c2274c
Parents: 161b1aa
Author: Aditya Auradkar <aauradkar@linkedin.com>
Authored: Mon May 4 11:52:30 2015 -0700
Committer: Neha Narkhede <nehanarkhede@apache.org>
Committed: Mon May 4 11:52:37 2015 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/consumer/SimpleConsumer.scala | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/e40ebcff/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/consumer/SimpleConsumer.scala b/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
index cbef84a..31a2639 100644
--- a/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
+++ b/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
@@ -17,6 +17,9 @@
 
 package kafka.consumer
 
+
+import java.nio.channels.ClosedByInterruptException
+
 import kafka.api._
 import kafka.network._
 import kafka.utils._
@@ -70,6 +73,8 @@ class SimpleConsumer(val host: String,
         blockingChannel.send(request)
         response = blockingChannel.receive()
       } catch {
+        case e : ClosedByInterruptException =>
+          throw e
         case e : Throwable =>
           info("Reconnect due to socket error: %s".format(e.toString))
           // retry once


Mime
View raw message