kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: HOTFIX: Tools for releases prior to 0.10.1 need --new-consumer flag
Date Thu, 29 Sep 2016 06:49:36 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 67e99d086 -> a6f3cf56b


HOTFIX: Tools for releases prior to 0.10.1 need --new-consumer flag

Author: Jason Gustafson <jason@confluent.io>

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes #1931 from hachikuji/fix-broken-upgrade-tests


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/a6f3cf56
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/a6f3cf56
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/a6f3cf56

Branch: refs/heads/trunk
Commit: a6f3cf56b3ce5c97e89f4b80c34d54ea608950ee
Parents: 67e99d0
Author: Jason Gustafson <jason@confluent.io>
Authored: Thu Sep 29 07:48:40 2016 +0100
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Thu Sep 29 07:48:40 2016 +0100

----------------------------------------------------------------------
 tests/kafkatest/services/console_consumer.py                | 4 +++-
 .../kafkatest/services/performance/consumer_performance.py  | 9 +++++----
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/a6f3cf56/tests/kafkatest/services/console_consumer.py
----------------------------------------------------------------------
diff --git a/tests/kafkatest/services/console_consumer.py b/tests/kafkatest/services/console_consumer.py
index 237d028..7978963 100644
--- a/tests/kafkatest/services/console_consumer.py
+++ b/tests/kafkatest/services/console_consumer.py
@@ -22,7 +22,7 @@ from ducktape.utils.util import wait_until
 
 from kafkatest.directory_layout.kafka_path import KafkaPathResolverMixin
 from kafkatest.services.monitor.jmx import JmxMixin
-from kafkatest.version import TRUNK, LATEST_0_8_2, LATEST_0_9, V_0_10_0_0
+from kafkatest.version import TRUNK, LATEST_0_8_2, LATEST_0_9, LATEST_0_10_0, V_0_10_0_0
 
 """
 0.8.2.1 ConsoleConsumer options
@@ -176,6 +176,8 @@ class ConsoleConsumer(KafkaPathResolverMixin, JmxMixin, BackgroundThreadService)
               "--topic %(topic)s --consumer.config %(config_file)s" % args
 
         if self.new_consumer:
+            if node.version <= LATEST_0_10_0:
+                cmd += " --new-consumer"
             cmd += " --bootstrap-server %(broker_list)s" % args
         else:
             cmd += " --zookeeper %(zk_connect)s" % args

http://git-wip-us.apache.org/repos/asf/kafka/blob/a6f3cf56/tests/kafkatest/services/performance/consumer_performance.py
----------------------------------------------------------------------
diff --git a/tests/kafkatest/services/performance/consumer_performance.py b/tests/kafkatest/services/performance/consumer_performance.py
index cb661e3..a17545d 100644
--- a/tests/kafkatest/services/performance/consumer_performance.py
+++ b/tests/kafkatest/services/performance/consumer_performance.py
@@ -18,7 +18,7 @@ import os
 
 from kafkatest.services.performance import PerformanceService
 from kafkatest.services.security.security_config import SecurityConfig
-from kafkatest.version import TRUNK, V_0_9_0_0
+from kafkatest.version import TRUNK, V_0_9_0_0, LATEST_0_10_0
 
 
 class ConsumerPerformanceService(PerformanceService):
@@ -97,8 +97,7 @@ class ConsumerPerformanceService(PerformanceService):
         for node in self.nodes:
             node.version = version
 
-    @property
-    def args(self):
+    def args(self, version):
         """Dictionary of arguments used to start the Consumer Performance script."""
         args = {
             'topic': self.topic,
@@ -106,6 +105,8 @@ class ConsumerPerformanceService(PerformanceService):
         }
 
         if self.new_consumer:
+            if version <= LATEST_0_10_0:
+                args['new-consumer'] = ""
             args['broker-list'] = self.kafka.bootstrap_servers(self.security_config.security_protocol)
         else:
             args['zookeeper'] = self.kafka.zk.connect_setting()
@@ -135,7 +136,7 @@ class ConsumerPerformanceService(PerformanceService):
         cmd += " export KAFKA_OPTS=%s;" % self.security_config.kafka_opts
         cmd += " export KAFKA_LOG4J_OPTS=\"-Dlog4j.configuration=file:%s\";" % ConsumerPerformanceService.LOG4J_CONFIG
         cmd += " %s" % self.path.script("kafka-consumer-perf-test.sh", node)
-        for key, value in self.args.items():
+        for key, value in self.args(node.version).items():
             cmd += " --%s %s" % (key, value)
 
         if node.version >= V_0_9_0_0:


Mime
View raw message