sendEvent(event: ControllerEvent): Unit
ControllerBrokerRequestBatch
ControllerBrokerRequestBatch is a concrete AbstractControllerBrokerRequestBatch.
ControllerBrokerRequestBatch uses a ControllerChannelManager to send an controller request out to a broker.
ControllerBrokerRequestBatch uses a ControllerEventManager to enqueue a ControllerEvent (to ControllerEventManager).
ControllerBrokerRequestBatch is created exclusively for KafkaController (for brokerRequestBatch, ReplicaStateMachine, and PartitionStateMachine).
Every time ControllerBrokerRequestBatch is used it is first requested to prepare a new batch (of controller requests) that is then send out to selected brokers.
Creating ControllerBrokerRequestBatch Instance
ControllerBrokerRequestBatch takes the following to be created:
Emitting (Enqueuing) ControllerEvent — sendEvent Method
|
Note
|
sendEvent is part of the AbstractControllerBrokerRequestBatch Contract to send a ControllerEvent.
|
sendEvent simply requests the ControllerEventManager to enqueue the controller event.
Sending AbstractControlRequest Out to Broker — sendRequest Method
sendRequest(
brokerId: Int,
request: AbstractControlRequest.Builder[_ <: AbstractControlRequest],
callback: AbstractResponse => Unit = null): Unit
|
Note
|
sendRequest is part of the AbstractControllerBrokerRequestBatch Contract to send a AbstractControlRequest to a broker.
|
sendRequest simply requests the ControllerChannelManager to send the request to the broker.