提交 d2fba24c 编写于 作者: H husterxsp 提交者: dinglei

[ISSUE #776] make mqadmin usage information more friendly to user(#796)

上级 39406a31
...@@ -19,6 +19,7 @@ package org.apache.rocketmq.tools.command.topic; ...@@ -19,6 +19,7 @@ package org.apache.rocketmq.tools.command.topic;
import java.util.Set; import java.util.Set;
import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option; import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionGroup;
import org.apache.commons.cli.Options; import org.apache.commons.cli.Options;
import org.apache.rocketmq.common.TopicConfig; import org.apache.rocketmq.common.TopicConfig;
import org.apache.rocketmq.common.sysflag.TopicSysFlag; import org.apache.rocketmq.common.sysflag.TopicSysFlag;
...@@ -43,13 +44,16 @@ public class UpdateTopicSubCommand implements SubCommand { ...@@ -43,13 +44,16 @@ public class UpdateTopicSubCommand implements SubCommand {
@Override @Override
public Options buildCommandlineOptions(Options options) { public Options buildCommandlineOptions(Options options) {
OptionGroup optionGroup = new OptionGroup();
Option opt = new Option("b", "brokerAddr", true, "create topic to which broker"); Option opt = new Option("b", "brokerAddr", true, "create topic to which broker");
opt.setRequired(false); optionGroup.addOption(opt);
options.addOption(opt);
opt = new Option("c", "clusterName", true, "create topic to which cluster"); opt = new Option("c", "clusterName", true, "create topic to which cluster");
opt.setRequired(false); optionGroup.addOption(opt);
options.addOption(opt);
optionGroup.setRequired(true);
options.addOptionGroup(optionGroup);
opt = new Option("t", "topic", true, "topic name"); opt = new Option("t", "topic", true, "topic name");
opt.setRequired(true); opt.setRequired(true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册