kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject kafka git commit: KAFKA-4044; log actual socket send/receive buffer size after connecting in Selector
Date Wed, 17 Aug 2016 15:05:22 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 11f1801c3 -> 19997ede0


KAFKA-4044; log actual socket send/receive buffer size after connecting in Selector

Author: Manikumar Reddy O <manikumar.reddy@gmail.com>

Reviewers: Jun Rao <junrao@gmail.com>

Closes #1750 from omkreddy/KAFKA-4044-LOG


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

Branch: refs/heads/trunk
Commit: 19997ede08bffeb95d17b2c41066e8943a391034
Parents: 11f1801
Author: Manikumar Reddy O <manikumar.reddy@gmail.com>
Authored: Wed Aug 17 08:05:18 2016 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Wed Aug 17 08:05:18 2016 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/kafka/common/network/Selector.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/19997ede/clients/src/main/java/org/apache/kafka/common/network/Selector.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/network/Selector.java b/clients/src/main/java/org/apache/kafka/common/network/Selector.java
index c333741..ab9dab9 100644
--- a/clients/src/main/java/org/apache/kafka/common/network/Selector.java
+++ b/clients/src/main/java/org/apache/kafka/common/network/Selector.java
@@ -309,6 +309,12 @@ public class Selector implements Selectable {
                     if (channel.finishConnect()) {
                         this.connected.add(channel.id());
                         this.sensors.connectionCreated.record();
+                        SocketChannel socketChannel = (SocketChannel) key.channel();
+                        log.debug("Created socket with SO_RCVBUF = {}, SO_SNDBUF = {}, SO_TIMEOUT
= {} to node {}",
+                                socketChannel.socket().getReceiveBufferSize(),
+                                socketChannel.socket().getSendBufferSize(),
+                                socketChannel.socket().getSoTimeout(),
+                                channel.id());
                     } else
                         continue;
                 }


Mime
View raw message