Class AdminUtils
java.lang.Object
org.apache.kafka.common.test.AdminUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic intfetchOrWaitForLeader(org.apache.kafka.clients.admin.Admin admin, String topic, int partitionNumber, long timeoutMs) Fetch the partition leader or wait until one is elected using the provided admin client.
-
Method Details
-
fetchOrWaitForLeader
public static int fetchOrWaitForLeader(org.apache.kafka.clients.admin.Admin admin, String topic, int partitionNumber, long timeoutMs) throws InterruptedException Fetch the partition leader or wait until one is elected using the provided admin client.- Throws:
InterruptedException
-