KAFKA-724; Allow automatic socket.send.buffer from operating system in SocketServer#1469
KAFKA-724; Allow automatic socket.send.buffer from operating system in SocketServer#1469rekhajoshm wants to merge 7 commits intoapache:trunkfrom
Conversation
Apache Kafka trunk pull
Apache Kafka trunk pull
Apache Kafka trunk pull
| if(readBufferSize != Selectable.USE_DEFAULT_BUFFER_SIZE) | ||
| channel.socket.setReceiveBufferSize(readBufferSize) | ||
| if(writeBufferSize > 0) | ||
| if(writeBufferSize != Selectable.USE_DEFAULT_BUFFER_SIZE) |
There was a problem hiding this comment.
This is a change in behaviour (-2 would throw an exception instead of using the OS default) and BlockingChannel is deprecated, so I would prefer not to change it.
|
Thanks for the PR @rekhajoshm. I left a couple of minor comments. Also, the PR title and description are used in the merged commit message. Can you please edit them to be: PR title: PR description: |
|
One more thing: we should also update the documentation in |
|
done @ijuma Please have a look. thanks. |
| import kafka.utils._ | ||
| import org.apache.kafka.common.metrics._ | ||
| import org.apache.kafka.common.network.{ChannelBuilders, KafkaChannel, LoginType, Mode, Selector => KSelector} | ||
| import org.apache.kafka.common.network.{Selector => KSelector, _} |
There was a problem hiding this comment.
We prefer to avoid wildcard imports.
|
Thanks @ijuma Please have a look. thanks |
|
The PR build failed @rekhajoshm. |
|
my bad.fixed @ijuma Please have a look. thanks |
|
Thanks, LGTM. Merged to trunk. |
|
I am interested in such feature for configuring a producer but using I believe this is caused by an .define(SEND_BUFFER_CONFIG, Type.INT, 128 * 1024, atLeast(0), Importance.MEDIUM, CommonClientConfigs.SEND_BUFFER_DOC)
.define(RECEIVE_BUFFER_CONFIG, Type.INT, 32 * 1024, atLeast(0), Importance.MEDIUM, CommonClientConfigs.RECEIVE_BUFFER_DOC)I can create a separate PR for this but because |
|
@slaunay Yes, please create a PR. |
Follow up on KAFKA-724 (#1469) to allow OS socket buffer sizes auto tuning for both the broker and the clients. Author: Sebastien Launay <sebastien@opendns.com> Reviewers: Sriharsha Chintalapani <harsha@hortonworks.com>, Grant Henke <granthenke@gmail.com>, Ismael Juma <ismael@juma.me.uk> Closes #1507 from slaunay/enhancement/os-socket-buffer-size-tuning-for-clients
If socket.receive.buffer.bytes/socket.send.buffer.bytes are set to -1, use the OS defaults.