[ 
https://issues.apache.org/jira/browse/KAFKA-335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yang Ye updated KAFKA-335:
--------------------------

    Attachment: kafka_controller_v4.patch
                kafka_controller_v4.patch

31. KafkaController:
31.1 In general, the watcher for a ZK path needs to be subscribed before 
reading the path. Otherwise, some events on the path could be missed. So in 
starup(): registerControllerExistListener() needs to be done before 
tryToBecomeController. In tryToBecomeController(),  
registerBrokerChangeListener() and registerTopicChangeListener() need to be 
called before reading brokers and topics from ZK.

Fixed this

31.2 do we need 3 locks? We can probably just use 1 lock to synchronize all 
access to allBrokers and allTopics.

It's not necessary, so I replaced them with just one lock


31.3 tryToBecomeController(): need to add the initial set of brokers to 
ControllerChannelManager

I think we already added the initial set of brokers to the manager


31.4 need a sessionExpiration listener so that it can clean state after the 
controller lost its registration (e.g., shut down ControllerChannelManager and  
call tryToBecomeController).

Fixed this

31.5 In tryToBecomeController, set controllerChannelManager to null if it can't 
become a controller.
I don't think it's necessary, because the manager is always initialized as 
null, and only changed to not null if it becomes the controller


32. BrokerChangeListener.handleChildChange(): should remove deleted brokers 
from allBrokers.
Fixed this


33. ControllerExistListener.handleDataChange(): If no logic is needed here, add 
a comment to make it clear.

Fixed this

34. ZkUitls: remove extra new line after getTopicPartitionLeaderAndISR



35. ControllerBasicTest: remove extra new lines btw methods
Fixed it


36. RequestSendThread: Should we name the thread "requestSendThread-brokerid"?
Fixed it
                
> Implement an embedded controller
> --------------------------------
>
>                 Key: KAFKA-335
>                 URL: https://issues.apache.org/jira/browse/KAFKA-335
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>            Assignee: Yang Ye
>             Fix For: 0.8
>
>         Attachments: kafka_controller_v1.patch, kafka_controller_v2.patch, 
> kafka_controller_v3.patch, kafka_controller_v4.patch, 
> kafka_controller_v4.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> This ticket will implement a controller as described in 
> https://cwiki.apache.org/confluence/display/KAFKA/kafka+Detailed+Replication+Design+V3
> This includes creating the controller path, setting up necessary watchers 
> (e.g, Broker path and TopicPath), and failover the controller.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to