Search in sources :

Example 1 with Controller

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();
}
Also used : ControllerServer(kafka.server.ControllerServer) Controller(org.apache.kafka.controller.Controller)

Aggregations

ControllerServer (kafka.server.ControllerServer)1 Controller (org.apache.kafka.controller.Controller)1