Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-5599: ConsoleConsumer : --new-consumer option as deprecated #3537

Closed
wants to merge 2 commits into from

Conversation

ppatierno
Copy link
Contributor

Marking --new-consumer as deprecated in the help of ConsoleConsumer
Printing a warning on using the new consumer but adding the --new-consumer option

Printing a warning on using the new consumer but adding the --new-consumer option
@asfgit
Copy link

asfgit commented Jul 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/6099/
Test PASSed (JDK 8 and Scala 2.12).

@asfgit
Copy link

asfgit commented Jul 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.11/6114/
Test PASSed (JDK 7 and Scala 2.11).

Copy link
Contributor

@ijuma ijuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, left a couple of comments. Also, should we do this for all tools that have a --new-consumer option?

@@ -269,7 +269,7 @@ object ConsoleConsumer extends Logging {
.withRequiredArg
.describedAs("metrics directory")
.ofType(classOf[java.lang.String])
val newConsumerOpt = parser.accepts("new-consumer", "Use the new consumer implementation. This is the default.")
val newConsumerOpt = parser.accepts("new-consumer", "DEPRECATED Use the new consumer implementation. This is the default.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe at the end, "This is the default, so this option is deprecated and will be removed in a future release." Otherwise it may seem like using the new consumer is deprecated.

CommandLineUtils.checkRequiredArgs(parser, options, bootstrapServerOpt)

if (options.has(newConsumerOpt)) {
Console.err.println("Using the --new-consumer option is deprecated and will be removed " +
"in a future major release. For using the new consumer just use only the --bootstrap-server option")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

"The --new-consumer option is deprecated and will be removed in a future major release. The new consumer is used by default if the --bootstrap-server option is provided."

@ppatierno
Copy link
Contributor Author

@ijuma updted after your comments. As native english speaker I think you are absolutely right ;) For the other tools which use the --new-consumer option I'm going to open a new JIRA and the providing a different PR.

@asfgit
Copy link

asfgit commented Jul 20, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.11/6199/
Test FAILed (JDK 7 and Scala 2.11).

@asfgit
Copy link

asfgit commented Jul 20, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/6183/
Test PASSed (JDK 8 and Scala 2.12).

@ppatierno
Copy link
Contributor Author

Retest this please

@asfgit
Copy link

asfgit commented Jul 20, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/6195/
Test PASSed (JDK 8 and Scala 2.12).

@asfgit
Copy link

asfgit commented Jul 20, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.11/6211/
Test PASSed (JDK 7 and Scala 2.11).

@ppatierno
Copy link
Contributor Author

@ijuma any news about having this merged after my changes ?

@ppatierno
Copy link
Contributor Author

ppatierno commented Aug 1, 2017

This PR should be ready to merge after the @ijuma approval. What do you think @guozhangwang ? I have a quite similar PR #3555 for all other tools. It could be good to have both merged for the 1.0.0 release so we can then move to remove this option in the next release cycle.

@asfgit
Copy link

asfgit commented Aug 1, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.11/6462/
Test PASSed (JDK 7 and Scala 2.11).

@asfgit
Copy link

asfgit commented Aug 1, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/6447/
Test PASSed (JDK 8 and Scala 2.12).

@guozhangwang
Copy link
Contributor

Thanks @ppatierno . I'll leave to @ijuma to merge then since he reviewed the PR.

Copy link
Contributor

@ijuma ijuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, LGTM. I'll do a minor change before merging to trunk as per the comment below.

@@ -269,7 +269,7 @@ object ConsoleConsumer extends Logging {
.withRequiredArg
.describedAs("metrics directory")
.ofType(classOf[java.lang.String])
val newConsumerOpt = parser.accepts("new-consumer", "Use the new consumer implementation. This is the default.")
val newConsumerOpt = parser.accepts("new-consumer", "This is the default, so this option is deprecated and will be removed in a future release.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still have the description of the parameter. I'll add it back before merging.

@asfgit asfgit closed this in 5766f21 Aug 4, 2017
@ppatierno ppatierno deleted the kafka-5599 branch August 4, 2017 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants