Skip to content

KAFKA-14575: Move ClusterTool to tools module#13080

Merged
mimaison merged 2 commits intoapache:trunkfrom
mimaison:KAFKA-14575
Jan 22, 2023
Merged

KAFKA-14575: Move ClusterTool to tools module#13080
mimaison merged 2 commits intoapache:trunkfrom
mimaison:KAFKA-14575

Conversation

@mimaison
Copy link
Copy Markdown
Member

@mimaison mimaison commented Jan 5, 2023

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

Copy link
Copy Markdown
Contributor

@fvaleri fvaleri left a comment

Choose a reason for hiding this comment

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

I tried your changes on a running cluster and they work fine.
Left few comments.
Thanks.

.help("A list of host/port pairs to use for establishing the connection to the kafka cluster.");
subpparser.addArgument("--config", "-c")
.action(store())
.help("A property file containing configs to passed to AdminClient.");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
.help("A property file containing configs to passed to AdminClient.");
.help("A property file containing custom configs for the AdminClient.");

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, I've reworded that message

Exit.exit(mainNoExit(args));
}

static int mainNoExit(String... args) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not simply embed this logic inside the main method to have one less stack frame?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The idea was to make it like MetadataQuorumCommand. In the future we will be able to put this method in a Command interface or utils class.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like the idea of the command interface. In that case, we should add the suffix *Command to all implementing classes (e.g. ClusterToolCommand).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes. I was thinking of doing that after the Scala to Java conversion.

@fvaleri
Copy link
Copy Markdown
Contributor

fvaleri commented Jan 9, 2023

LGTM. Thanks.

Copy link
Copy Markdown
Member

@dengziming dengziming left a comment

Choose a reason for hiding this comment

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

LGTM, I find that we didn't have a 1bin/windows/kafka-cluster.bat1 currently, how about added it here as a connivence.

@mimaison
Copy link
Copy Markdown
Member Author

@dengziming I opened https://issues.apache.org/jira/browse/KAFKA-14614 to look at the missing script for Windows

Copy link
Copy Markdown
Member

@dengziming dengziming left a comment

Choose a reason for hiding this comment

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

LGTM.

@mimaison mimaison merged commit 8b44237 into apache:trunk Jan 22, 2023
@mimaison mimaison deleted the KAFKA-14575 branch January 22, 2023 11:50
guozhangwang pushed a commit to guozhangwang/kafka that referenced this pull request Jan 25, 2023
Reviewers: dengziming <dengziming1993@gmail.com>, Federico Valeri  <fedevaleri@gmail.com>
@fvaleri fvaleri added the tools label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants