Repository: kafka
Updated Branches:
refs/heads/0.11.0 2d9dedca1 -> 7184343ed
KAFKA-5463; Controller incorrectly logs rack information when new brokers are
added
Before:
```
pri=TRACE t=Controller-1-to-broker-0-send-thread at=logger Controller 1 epoch 1
received response {error_code=0} for a request sent to broker <ip>:<port> (id:
0 rack: null)
```
After:
```
pri=TRACE t=Controller-1-to-broker-0-send-thread at=logger Controller 1 epoch 1
received response {error_code=0} for a request sent to broker <ip>:<port> (id:
0 rack: us-east-1d)
```
Author: Jeff Chao <[email protected]>
Reviewers: Onur Karaman <[email protected]>, Ismael Juma <[email protected]>
Closes #3358 from jeffchao/fix-controller-rack-aware-logging
(cherry picked from commit 3fdbba1c7218f77fc4b7b4b2d7d2a8b4b24ef1f0)
Signed-off-by: Ismael Juma <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/7184343e
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/7184343e
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/7184343e
Branch: refs/heads/0.11.0
Commit: 7184343edfbe7844d284b8b38d814182104430c6
Parents: 2d9dedc
Author: Jeff Chao <[email protected]>
Authored: Sat Jun 17 08:52:24 2017 +0100
Committer: Ismael Juma <[email protected]>
Committed: Sat Jun 17 08:53:51 2017 +0100
----------------------------------------------------------------------
.../main/scala/kafka/controller/ControllerChannelManager.scala | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/7184343e/core/src/main/scala/kafka/controller/ControllerChannelManager.scala
----------------------------------------------------------------------
diff --git
a/core/src/main/scala/kafka/controller/ControllerChannelManager.scala
b/core/src/main/scala/kafka/controller/ControllerChannelManager.scala
index 758ff88..369da05 100755
--- a/core/src/main/scala/kafka/controller/ControllerChannelManager.scala
+++ b/core/src/main/scala/kafka/controller/ControllerChannelManager.scala
@@ -106,8 +106,7 @@ class ControllerChannelManager(controllerContext:
ControllerContext, config: Kaf
private def addNewBroker(broker: Broker) {
val messageQueue = new LinkedBlockingQueue[QueueItem]
debug("Controller %d trying to connect to broker
%d".format(config.brokerId, broker.id))
- val brokerEndPoint =
broker.getBrokerEndPoint(config.interBrokerListenerName)
- val brokerNode = new Node(broker.id, brokerEndPoint.host,
brokerEndPoint.port)
+ val brokerNode = broker.getNode(config.interBrokerListenerName)
val networkClient = {
val channelBuilder = ChannelBuilders.clientChannelBuilder(
config.interBrokerSecurityProtocol,