summaryrefslogtreecommitdiff
path: root/kafka/consumer
diff options
context:
space:
mode:
authorDana Powers <dana.powers@rd.io>2015-12-29 17:01:41 -0800
committerDana Powers <dana.powers@rd.io>2015-12-29 17:05:08 -0800
commit2a2733d4fc725f04461a6c4d0ca0fc253f99caeb (patch)
tree440c6e4816a91b5290aabb36d3570e9daab5db43 /kafka/consumer
parentb7d1ed3fb4644c3b255eea356b7de273b522d1f4 (diff)
downloadkafka-python-2a2733d4fc725f04461a6c4d0ca0fc253f99caeb.tar.gz
Improve various docstrings
Diffstat (limited to 'kafka/consumer')
-rw-r--r--kafka/consumer/subscription_state.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/kafka/consumer/subscription_state.py b/kafka/consumer/subscription_state.py
index a562093..5330e9f 100644
--- a/kafka/consumer/subscription_state.py
+++ b/kafka/consumer/subscription_state.py
@@ -151,9 +151,16 @@ class SubscriptionState(object):
self.needs_partition_assignment = False
def assign_from_subscribed(self, assignments):
- """
- Change the assignment to the specified partitions returned from the coordinator,
- note this is different from {@link #assignFromUser(Collection)} which directly set the assignment from user inputs
+ """Update the assignment to the specified partitions
+
+ This method is called by the coordinator to dynamically assign
+ partitions based on the consumer's topic subscription. This is different
+ from assign_from_user() which directly sets the assignment from a
+ user-supplied TopicPartition list.
+
+ Arguments:
+ assignments (list of TopicPartition): partitions to assign to this
+ consumer instance.
"""
if self.subscription is None:
raise IllegalStateError(self._SUBSCRIPTION_EXCEPTION_MESSAGE)