kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nehanarkh...@apache.org
Subject git commit: KAFKA-1692 Include client ID in new producer IO thread name; reviewed by Neha Narkhede
Date Sun, 12 Oct 2014 22:50:56 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 1733c0bfb -> 7062ed7db


KAFKA-1692 Include client ID in new producer IO thread name; 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/7062ed7d
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/7062ed7d
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/7062ed7d

Branch: refs/heads/trunk
Commit: 7062ed7db36f913328a9124797c47f70e3461025
Parents: 1733c0b
Author: Ewen Cheslack-Postava <me@ewencp.org>
Authored: Sun Oct 12 15:50:31 2014 -0700
Committer: Neha Narkhede <neha.narkhede@gmail.com>
Committed: Sun Oct 12 15:50:48 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/kafka/clients/producer/KafkaProducer.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/7062ed7d/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
index f58b850..32f444e 100644
--- a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
+++ b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
@@ -139,7 +139,8 @@ public class KafkaProducer implements Producer {
                                  config.getInt(ProducerConfig.TIMEOUT_CONFIG),
                                  this.metrics,
                                  new SystemTime());
-        this.ioThread = new KafkaThread("kafka-producer-network-thread", this.sender, true);
+        String ioThreadName = "kafka-producer-network-thread" + (clientId.length() > 0
? " | " + clientId : "");
+        this.ioThread = new KafkaThread(ioThreadName, this.sender, true);
         this.ioThread.start();
 
         this.errors = this.metrics.sensor("errors");


Mime
View raw message