Merge pull request #315 from dpkp/sorted_partition_ids

Always return sorted partition ids in client.get_partition_ids_for_topic()
This commit is contained in:
Mark Roberts
2015-02-09 10:19:24 -08:00

View File

@@ -261,7 +261,7 @@ class KafkaClient(object):
if topic not in self.topic_partitions: if topic not in self.topic_partitions:
return None return None
return list(self.topic_partitions[topic]) return sorted(list(self.topic_partitions[topic]))
def ensure_topic_exists(self, topic, timeout = 30): def ensure_topic_exists(self, topic, timeout = 30):
start_time = time.time() start_time = time.time()