Browse Source

KAFKA-9519: Deprecate the --zookeeper flag in ConfigCommand (#8056)

Reviewers: Colin P. McCabe <cmccabe@apache.org>, Ron Dagostino <rndgstn@gmail.com>
pull/8070/head
Sanjana Kaundinya 5 years ago committed by GitHub
parent
commit
be4a6ddebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      core/src/main/scala/kafka/admin/ConfigCommand.scala

6
core/src/main/scala/kafka/admin/ConfigCommand.scala

@ -82,6 +82,8 @@ object ConfigCommand extends Config { @@ -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 { @@ -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])

Loading…
Cancel
Save