ControllerEvent详解
2020-09-08 11:41:56 0 举报
kafka的controllerEvent和对应的zookeeper节点的关系
作者其他创作
大纲/内容
partitionReassignmentHandler
isr_change_notification
2
TopicDeletionStopReplicaResponseReceived(根据broker对stopReplica请求的返回把相应的replica切换为Successful或Ineligible)
partitions
LogDirEventNotification(对相应的brokerId发送leaderAndIsrRequest检查相应的Replica的状态)
delete_topics
ids
broker
childChange
1
brokers
delete
configHandler
client
TopicChangefont color=\"#ff0080\
seqid
dataChange
zkSession
controller
EventManager
topicDeletionHandler
kafkaScheduler
controllerChangeHandler
IsrChangeNotification(更新controllerContext中的对应partition的leaderIsrAndControllerEpoch数据)
topic_1
topic_2
brokerChange font color=\"#ff3399\
reassign_partitions
preferred_replica_election
LeaderAndIsrResponseReceived(把offline的对应Replica切换到offline)
log_dir_event_notification
partitionModificationHandler
preferredReplicaElectionHandler
topics
state
PartitionReassignmentIsrChangeHandler
TopicDeletionfont color=\"#ff0080\
Expirefont color=\"#ff3399\
Reelect(font color=\"#007fff\
admin
PartitionReassignmentIsrChange(等待zk中partition中都有reassignment的ISR时继续OnPartitionReassignment操作)
logDirEventNotificationHandler
ControllerdShutdown(把在controller的partition的leader转移到其他broker)
PartitionModifications(对新加的partition执行onNewPartition操作)
PreferredReplicaLeaderElection(通过将对应partition切为Online状态来重新选举leader为数据配置的leadere)
topicChangeHandler
RegisterBrokerAndReelect (与zk建立session后注册broker和Relect)
Startup(注册controllerChangeHandler并且elect)
creation
BrokerModifications(更新broker在内存中的metadata数据并发送给broker)
AutoPreferredReplicaLeaderElectionfont color=\"#ff3399\
startup
brokerChangeHandler
isrChangeNotificationHandler
ControllerChange(maybeReassign)
PartitionReassignment(注册PartitionReassignmentIsrChangeHandler并OnPartitionReassignment操作span style=\
/
UncleanLeaderElectionEnable(配置修改为允许不在isr中的副本选举时把new和offline状态的partition切换为online)
TopicUncleanLeaderElectionEnable(topic配置修改为允许不在isr中的副本选举时把new和offline状态的partition切换为online)
brokerModificationsHandler
0 条评论
下一页