[
https://issues.apache.org/jira/browse/KAFKA-3761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15303571#comment-15303571
]
ASF GitHub Bot commented on KAFKA-3761:
---------------------------------------
GitHub user theduderog opened a pull request:
https://github.com/apache/kafka/pull/1437
KAFKA-3761: Controller has RunningAsBroker instead of RunningAsController
state
@junrao @ijuma
This works for me in local testing. Do you see any issues?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/theduderog/kafka KAFKA-3761-broker-state
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/1437.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1437
----
commit 6278fdec8c75a6ccc610a602c8cf27c2c1706bfb
Author: Roger Hoover <[email protected]>
Date: 2016-05-27T05:54:50Z
Setting RunningAsController after RunningAsBroker
----
> Controller has RunningAsBroker instead of RunningAsController state
> -------------------------------------------------------------------
>
> Key: KAFKA-3761
> URL: https://issues.apache.org/jira/browse/KAFKA-3761
> Project: Kafka
> Issue Type: Bug
> Reporter: Ismael Juma
> Assignee: Roger Hoover
>
> In `KafkaServer.start`, we start `KafkaController`:
> {code}
> /* start kafka controller */
> kafkaController = new KafkaController(config, zkUtils, brokerState,
> kafkaMetricsTime, metrics, threadNamePrefix)
> kafkaController.startup()
> {code}
> Which sets the state to `RunningAsController` in
> `KafkaController.onControllerFailover`:
> `brokerState.newState(RunningAsController)`
> And this later gets set to `RunningAsBroker`.
> This doesn't match the diagram in `BrokerStates`. [~junrao] suggested that we
> should start the controller after we register the broker in ZK, but this
> seems tricky as we need to controller in `KafkaApis`.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)