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-5225: StreamsResetter tool to allow custom consumer properties #3062

Closed
wants to merge 6 commits into from

Conversation

bharatviswa504
Copy link

@mjsax @guozhangwang Could you please review the changes.

@asfbot
Copy link

asfbot commented May 15, 2017

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

@asfbot
Copy link

asfbot commented May 15, 2017

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

@mjsax
Copy link
Member

mjsax commented May 15, 2017

Thanks for the patch. I think, we should try to align this with other CLI tools. For example. ConsoleConsumer.scala uses consumer-property for specify configs as key-value-pairs on command line, and consumer.config to specify a consumer config file.

I think, we also need a KIP for this JIRA. \cc @gwenshap @ewencp @guozhangwang

@ewencp
Copy link
Contributor

ewencp commented May 16, 2017

@mjsax KIP is accurate, though this is one of those things that we should probably get a KIP for a standard set of config options across all tools so additions like this can just fall under the umbrella of that KIP...

@bharatviswa504
Copy link
Author

@mjsax Update the code to add consumer-property option and also changed the file option to consumer.config

@bharatviswa504
Copy link
Author

bharatviswa504 commented May 16, 2017

@ewencp @mjsax Proposed KIP 157 for this. Please let me know how to include this KIP 157 under main KIP for config options for kafka tools. As KIP 156 is also to add an option to reset tool. As if we include all KIP's related to tools under one main KIP, it will be easy to refer in future and also it will help further developers to use the similar naming convention for options in kafka tools.

@asfbot
Copy link

asfbot commented May 16, 2017

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

@asfbot
Copy link

asfbot commented May 16, 2017

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

@asfbot
Copy link

asfbot commented May 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/4045/
Test PASSed (JDK 8 and Scala 2.12).

@asfbot
Copy link

asfbot commented May 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/4059/
Test PASSed (JDK 7 and Scala 2.11).

@bharatviswa504
Copy link
Author

@mjsax @guozhangwang Could you please review the changes.

@asfbot
Copy link

asfbot commented May 19, 2017

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

@asfbot
Copy link

asfbot commented May 19, 2017

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

Copy link
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

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

We should also add some tests. For example, using the reset tool with a secured cluster.

I am also wondering, if --dry-run option should print user configs or not? This is just a thought.

parsedConsumerProperties.put(property[0], property[1]);
} else {
System.err.println("Invalid command line properties: " + consumerProperties.toString());
System.exit(1);
Copy link
Member

Choose a reason for hiding this comment

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

We should just throw an "InvalidArgumentException" here.

@@ -163,6 +193,15 @@ private void parseArguments(final String[] args) throws IOException {
.ofType(String.class)
.withValuesSeparatedBy(',')
.describedAs("list");
consumerPropertyOption = optionParser.accepts("consumer-property", "A mechanism to pass user-defined properties in the form key=value to the consumer")
Copy link
Member

Choose a reason for hiding this comment

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

We are using AdminClient, ZkUtils, and a KafkaConsumer -- do we need to allow properties for all three?

@@ -163,6 +193,15 @@ private void parseArguments(final String[] args) throws IOException {
.ofType(String.class)
.withValuesSeparatedBy(',')
.describedAs("list");
consumerPropertyOption = optionParser.accepts("consumer-property", "A mechanism to pass user-defined properties in the form key=value to the consumer")
.withRequiredArg()
.ofType(String.class)
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a list-of-string instead of a string?

@bharatviswa504 bharatviswa504 deleted the KAFKA-5225 branch May 22, 2017 21:10
@bharatviswa504
Copy link
Author

Created a new PR #3117

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