Interface BrokerClusterState
- All Known Implementing Classes:
BrokerClusterStateImpl
public interface BrokerClusterState
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptiongetBrokerAddress(int brokerId) getBrokerVersion(int brokerId) intgetFollowersForPartition(int partition) getInactiveNodesForPartition(int partition) intgetLeaderForPartition(int partition) intgetPartition(int index) getPartitionHealth(int brokerId, int partition) intintint
-
Field Details
-
UNKNOWN_NODE_ID
static final int UNKNOWN_NODE_ID- See Also:
-
NODE_ID_NULL
static final int NODE_ID_NULL- See Also:
-
PARTITION_ID_NULL
static final int PARTITION_ID_NULL- See Also:
-
-
Method Details
-
getClusterSize
int getClusterSize() -
getPartitionsCount
int getPartitionsCount() -
getReplicationFactor
int getReplicationFactor() -
getLeaderForPartition
int getLeaderForPartition(int partition) -
getFollowersForPartition
-
getInactiveNodesForPartition
-
getRandomBroker
int getRandomBroker()- Returns:
- the node id of a random broker or
UNKNOWN_NODE_IDif no brokers are known
-
getPartitions
-
getBrokers
-
getBrokerAddress
-
getPartition
int getPartition(int index) -
getBrokerVersion
-
getPartitionHealth
-