Browse Source

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
Tong Li 3 years ago
parent
commit
15d8569019
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      kiloeyes/common/kafka_conn.py

+ 1
- 1
kiloeyes/common/kafka_conn.py View File

@@ -78,7 +78,7 @@ class KafkaConnection(object):
78 78
         self.max_retry = cfg.CONF.kafka_opts.max_retry
79 79
         self.auto_commit = cfg.CONF.kafka_opts.auto_commit
80 80
         self.compact = cfg.CONF.kafka_opts.compact
81
-        self.partitions = cfg.CONF.kafka_opts.partitions
81
+        self.partitions = [int(x) for x in cfg.CONF.kafka_opts.partitions]
82 82
         self.drop_data = cfg.CONF.kafka_opts.drop_data
83 83
 
84 84
         self._client = None

Loading…
Cancel
Save