You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ju...@apache.org on 2015/10/11 07:16:03 UTC

kafka git commit: MINOR: Use the correct processor id in the processor thread name

Repository: kafka
Updated Branches:
  refs/heads/trunk 1265d7cb7 -> bd98a99c1


MINOR: Use the correct processor id in the processor thread name

This restores the behaviour before 1265d7cb7.

Author: Ismael Juma <is...@juma.me.uk>

Reviewers: Jun Rao <ju...@gmail.com>

Closes #294 from ijuma/fix-processor-thread-name


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

Branch: refs/heads/trunk
Commit: bd98a99c1e28f17bccafc317c819c1a82bfc6244
Parents: 1265d7c
Author: Ismael Juma <is...@juma.me.uk>
Authored: Sat Oct 10 22:15:56 2015 -0700
Committer: Jun Rao <ju...@gmail.com>
Committed: Sat Oct 10 22:15:56 2015 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/network/SocketServer.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/bd98a99c/core/src/main/scala/kafka/network/SocketServer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/network/SocketServer.scala b/core/src/main/scala/kafka/network/SocketServer.scala
index ecceb97..41a3705 100644
--- a/core/src/main/scala/kafka/network/SocketServer.scala
+++ b/core/src/main/scala/kafka/network/SocketServer.scala
@@ -239,8 +239,8 @@ private[kafka] class Acceptor(val endPoint: EndPoint,
   val serverChannel = openServerSocket(endPoint.host, endPoint.port)
 
   this.synchronized {
-    processors.zipWithIndex.foreach { case (processor, i) =>
-      Utils.newThread("kafka-network-thread-%d-%s-%d".format(brokerId, endPoint.protocolType.toString, i), processor, false).start()
+    processors.foreach { processor =>
+      Utils.newThread("kafka-network-thread-%d-%s-%d".format(brokerId, endPoint.protocolType.toString, processor.id), processor, false).start()
     }
   }