kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject [kafka] branch 2.5 updated: KAFKA-9519: Deprecate the --zookeeper flag in ConfigCommand (#8056)
Date Sat, 08 Feb 2020 00:36:19 GMT
This is an automated email from the ASF dual-hosted git repository.

cmccabe pushed a commit to branch 2.5
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.5 by this push:
     new be22901  KAFKA-9519: Deprecate the --zookeeper flag in ConfigCommand (#8056)
be22901 is described below

commit be229013b62d8741d41b1c51ca8d5d6f6c5a0a4a
Author: Sanjana Kaundinya <skaundinya@confluent.io>
AuthorDate: Fri Feb 7 16:08:15 2020 -0800

    KAFKA-9519: Deprecate the --zookeeper flag in ConfigCommand (#8056)
    
    Reviewers: Colin P. McCabe <cmccabe@apache.org>, Ron Dagostino <rndgstn@gmail.com>
    (cherry picked from commit be4a6ddebb2728311f11bfaef25c0a2df7246129)
---
 core/src/main/scala/kafka/admin/ConfigCommand.scala | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/core/src/main/scala/kafka/admin/ConfigCommand.scala b/core/src/main/scala/kafka/admin/ConfigCommand.scala
index 77ae2ca..bf1ee27 100644
--- a/core/src/main/scala/kafka/admin/ConfigCommand.scala
+++ b/core/src/main/scala/kafka/admin/ConfigCommand.scala
@@ -82,6 +82,8 @@ object ConfigCommand extends Config {
       opts.checkArgs()
 
       if (opts.options.has(opts.zkConnectOpt)) {
+        println(s"Warning: --zookeeper is deprecated and will be removed in a future version
of Kafka.")
+        println(s"Use --bootstrap-server instead to specify a broker to connect to.")
         processCommandWithZk(opts.options.valueOf(opts.zkConnectOpt), opts)
       } else {
         processCommand(opts)
@@ -535,8 +537,8 @@ object ConfigCommand extends Config {
 
   class ConfigCommandOptions(args: Array[String]) extends CommandDefaultOptions(args) {
 
-    val zkConnectOpt = parser.accepts("zookeeper", "The connection string for the zookeeper
connection in the form host:port. " +
-            "Multiple URLS can be given to allow fail-over.")
+    val zkConnectOpt = parser.accepts("zookeeper", "DEPRECATED. The connection string for
the zookeeper connection in the form host:port. " +
+            "Multiple URLS can be given to allow fail-over. Replaced by --bootstrap-server,
REQUIRED unless --bootstrap-server is given.")
             .withRequiredArg
             .describedAs("urls")
             .ofType(classOf[String])


Mime
View raw message