use of org.apache.kafka.controller.Controller in project kafka by apache.
the class KafkaClusterTestKit method waitForReadyBrokers.
/**
* Wait for a controller to mark all the brokers as ready (registered and unfenced).
*/
public void waitForReadyBrokers() throws ExecutionException, InterruptedException {
// We can choose any controller, not just the active controller.
// If we choose a standby controller, we will wait slightly longer.
ControllerServer controllerServer = controllers.values().iterator().next();
Controller controller = controllerServer.controller();
controller.waitForReadyBrokers(brokers.size()).get();
}
Aggregations