From 15d8569019ba8f452bfe8994b924edf39eebb69f Mon Sep 17 00:00:00 2001 From: Tong Li Date: Wed, 10 Feb 2016 16:51:51 -0500 Subject: [PATCH] fix the partitions data type error the newer version of kafka client assumes that the partitions are a list of integers. This was not the case in earlier kafka client Change-Id: Icb706dd58816e60a047adc079cef425ac5696d6a --- kiloeyes/common/kafka_conn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kiloeyes/common/kafka_conn.py b/kiloeyes/common/kafka_conn.py index 21798f6..faf5ef9 100755 --- a/kiloeyes/common/kafka_conn.py +++ b/kiloeyes/common/kafka_conn.py @@ -78,7 +78,7 @@ class KafkaConnection(object): self.max_retry = cfg.CONF.kafka_opts.max_retry self.auto_commit = cfg.CONF.kafka_opts.auto_commit self.compact = cfg.CONF.kafka_opts.compact - self.partitions = cfg.CONF.kafka_opts.partitions + self.partitions = [int(x) for x in cfg.CONF.kafka_opts.partitions] self.drop_data = cfg.CONF.kafka_opts.drop_data self._client = None