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
}
LeaderAndISRRequest {
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 // the time in ms to wait for a response isInit : byte // whether this is the first command issued by a controller
leaderAndISRMap : Map[(topic: String, partitionId: int32) => LeaderAndISR) // a map of LeaderAndISR
}
LeaderAndISR {
leader : int32 // broker id of the leader
leaderGenId : int32 // leader generation id, incremented on each leadership change
ISR : Set[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 // the time in ms to wait for a response
stopReplicaSet : Set[(topic: String, partitionId: int)) // a set of partitions to be stopped
}
StopReplicaResponse {
version_id : int16 // the version of this request
responseMap : Map[(topic: String, partitionId: int32) => int16) // a map of error code
}
|
...