THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
Replica { // a replica of a partition broker_id : int partition : Partition log : Log // local log associated with this replica hw : long // offset of the last committed message leo : long // log end offset isLeader : Boolean // is this replica leader } Partition { //a partition in a topic topic : string partition_id : int leader : Replica // the leader replica of this partition ISR : Set[Replica] // In-sync replica set, maintained at the leader AR : Set[Replica] // All replicas assigned for this partition LeaderAndISRVersionInZK : long // version id of the LeaderAndISR path; used for conditionally update the LeaderAndISR path in ZK } LeaderAndISRCommandLeaderAndISRRequest { isInitrequest_type_id : int16 // the request id version_id : byte // whether: thisint16 is// the firstversion commandof issuedthis by a controller request client_id leaderAndISRMap : Map[(topic: String, partitionId: int) => LeaderAndISR) int32 // athis mapcan of LeaderAndISR } LeaderAndISR { leader be the broker id of the controller ack_timeout : intint32 // the time in ms to wait for a response // brokerisInit id of the leader leaderGenId : intbyte // whether this leaderis generationthe id,first incrementedcommand onissued eachby leadershipa changecontroller ISRleaderAndISRMap : Map[(topic: String, partitionId: int32) => LeaderAndISR) // a map of : Set[int] LeaderAndISR } LeaderAndISR { leader // a set : int32 // broker id of the leader leaderGenId : int32 // leader generation id, ofincremented on each brokerleadership change in ISR zkVersion : longSet[int32] // a set of the id of each broker in ISR zkVersion : int64 // version of the LeaderAndISR path in ZK } LeaderAndISRResponse { version_id : int16 // the version of this request responseMap : Map[(topic: String, partitionId: int32) => int16) // a map of error code } StopReplicaRequest { request_type_id : int16 // the request id version_id : int16 // the version of this request client_id : int32 // this can be the broker id of the controller ack_timeout : int32 // version of the LeaderAndISRtime pathin in ZK } LeaderAndISRResponse { responseMap ms to wait for a response stopReplicaSet : MapSet[(topic: String, partitionId: int) => int) // a mapset of partitions errorto be codestopped } StopReplicaCommand StopReplicaResponse { version_id stopReplicaSet : Set[(topic: String, partitionId: int))int16 // athe setversion of partitions to be stopped } StopReplicaResponse { this request responseMap : Map[(topic: String, partitionId: intint32) => intint16) // a map of error code } |
...