Skip to content

Commit 227a312

Browse files
committed
Improve ClusterMetadata docs re: node_id/broker_id str/int types
1 parent e905143 commit 227a312

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kafka/cluster.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def broker_metadata(self, broker_id):
9393
"""Get BrokerMetadata
9494
9595
Arguments:
96-
broker_id (int): node_id for a broker to check
96+
broker_id (int or str): node_id for a broker to check
9797
9898
Returns:
9999
BrokerMetadata or None if not found
@@ -148,7 +148,7 @@ def partitions_for_broker(self, broker_id):
148148
"""Return TopicPartitions for which the broker is a leader.
149149
150150
Arguments:
151-
broker_id (int): node id for a broker
151+
broker_id (int or str): node id for a broker
152152
153153
Returns:
154154
set: {TopicPartition, ...}
@@ -163,7 +163,7 @@ def coordinator_for_group(self, group):
163163
group (str): name of consumer group
164164
165165
Returns:
166-
int: node_id for group coordinator
166+
node_id (int or str) for group coordinator, -1 if coordinator unknown
167167
None if the group does not exist.
168168
"""
169169
return self._groups.get(group)

0 commit comments

Comments
 (0)