MINOR: Use KafkaConsumer in GetOffsetShell#5220
Conversation
There was a problem hiding this comment.
Should the above two lines be removed?
This does the minimal amount of work so that the tool relies on public non-deprecated APIs (i.e. so that it doesn't rely on old clients code). Additional improvements have been proposed via KIP-308. There are a few other PRs that touch this class with overlapping goals: - apache#2891 - apache#3051 - apache#3320 One of them remains relevant in the context of KIP-308, but the others are not. I included the authors of the 3 PRs as co-authors. Co-authored-by: Arseniy Tashoyan <tashoyan@gmail.com> Co-authored-by: Vahid Hashemian <vahidhashemian@us.ibm.com> Co-authored-by: Mohammed Amine GARMES Co-authored-by: Ismael Juma <ismael@juma.me.uk>
53bb908 to
aaa6c5c
Compare
| if(args.length == 0) | ||
|
|
||
| if (args.length == 0) | ||
| CommandLineUtils.printUsageAndDie(parser, "An interactive shell for getting consumer offsets.") |
There was a problem hiding this comment.
nit: we can update existing usage description
"An interactive shell for getting TOPIC offsets."
| System.err.println(("Error: no valid topic metadata for topic: %s, " + " probably the topic does not exist, run ").format(topic) + | ||
| "kafka-list-topic.sh to verify") | ||
| Exit.exit(1) | ||
| val partitionIdsRequested = options.valueOf(partitionOpt).split(",").map(_.toInt).toSet |
There was a problem hiding this comment.
need to handle empty string. partitionOpt default value is empty string
|
|
||
| val config = new Properties | ||
| config.setProperty(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, brokerList) | ||
| config.setProperty(ConsumerConfig.CLIENT_ID_CONFIG, clientId) |
There was a problem hiding this comment.
missing consumer deserializer props
|
Thanks for the review @omkreddy. Sorry, I should have mentioned that this was still WIP and I had not tested it yet. :) |
rajinisivaram
left a comment
There was a problem hiding this comment.
@ijuma Thanks for the PR, LGTM
|
JUnit test failure is unrelated and get_offset_shell system test passed: https://jenkins.confluent.io/view/All/job/system-test-kafka-branch-builder/1788/console Merging to trunk and 2.0. |
This does the minimal amount of work so that the tool relies on public non-deprecated APIs (i.e. it no longer relies on Scala clients code). Additional improvements (not included here) have been proposed via KIP-308. There are a few other PRs that touch this class with overlapping goals: - #2891 - #3051 - #3320 One of them remains relevant in the context of KIP-308, but the others have been superseded. I included the authors of the 3 PRs as co-authors. Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Vahid Hashemian <vahidhashemian@us.ibm.com>, Manikumar Reddy <manikumar.reddy@gmail.com> Co-authored-by: Arseniy Tashoyan <tashoyan@gmail.com> Co-authored-by: Vahid Hashemian <vahidhashemian@us.ibm.com> Co-authored-by: Mohammed Amine GARMES Co-authored-by: Ismael Juma <ismael@juma.me.uk>
This does the minimal amount of work so that the tool relies on public non-deprecated APIs (i.e. it no longer relies on Scala clients code). Additional improvements (not included here) have been proposed via KIP-308. There are a few other PRs that touch this class with overlapping goals: - apache#2891 - apache#3051 - apache#3320 One of them remains relevant in the context of KIP-308, but the others have been superseded. I included the authors of the 3 PRs as co-authors. Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Vahid Hashemian <vahidhashemian@us.ibm.com>, Manikumar Reddy <manikumar.reddy@gmail.com> Co-authored-by: Arseniy Tashoyan <tashoyan@gmail.com> Co-authored-by: Vahid Hashemian <vahidhashemian@us.ibm.com> Co-authored-by: Mohammed Amine GARMES Co-authored-by: Ismael Juma <ismael@juma.me.uk>
This does the minimal amount of work so that the tool
relies on public non-deprecated APIs (i.e. it no longer
relies on Scala clients code).
Additional improvements (not included here) have
been proposed via KIP-308.
There are a few other PRs that touch this class with
overlapping goals:
One of them remains relevant in the context of KIP-308, but
the others have been superseded. I included the authors of
the 3 PRs as co-authors.
Co-authored-by: Arseniy Tashoyan tashoyan@gmail.com
Co-authored-by: Vahid Hashemian vahidhashemian@us.ibm.com
Co-authored-by: Mohammed Amine GARMES
Co-authored-by: Ismael Juma ismael@juma.me.uk
Committer Checklist (excluded from commit message)