mirror of https://github.com/apache/kafka.git
MINOR: improve trogdor commandline (#4721)
Allow -c as a synonym for --agent.config and --coordinator.config. Allow -n as a synonym for --node-name. Add an example trogdor.conf file.
This commit is contained in:
parent
7041e76bd6
commit
0560193706
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"_comment": [
|
||||||
|
"Licensed to the Apache Software Foundation (ASF) under one or more",
|
||||||
|
"contributor license agreements. See the NOTICE file distributed with",
|
||||||
|
"this work for additional information regarding copyright ownership.",
|
||||||
|
"The ASF licenses this file to You under the Apache License, Version 2.0",
|
||||||
|
"(the \"License\"); you may not use this file except in compliance with",
|
||||||
|
"the License. You may obtain a copy of the License at",
|
||||||
|
"",
|
||||||
|
"http://www.apache.org/licenses/LICENSE-2.0",
|
||||||
|
"",
|
||||||
|
"Unless required by applicable law or agreed to in writing, software",
|
||||||
|
"distributed under the License is distributed on an \"AS IS\" BASIS,",
|
||||||
|
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
|
||||||
|
"See the License for the specific language governing permissions and",
|
||||||
|
"limitations under the License."
|
||||||
|
],
|
||||||
|
"platform": "org.apache.kafka.trogdor.basic.BasicPlatform", "nodes": {
|
||||||
|
"node0": {
|
||||||
|
"hostname": "localhost",
|
||||||
|
"trogdor.agent.port": 8888,
|
||||||
|
"trogdor.coordinator.port": 8889
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -109,14 +109,14 @@ public final class Agent {
|
||||||
.newArgumentParser("trogdor-agent")
|
.newArgumentParser("trogdor-agent")
|
||||||
.defaultHelp(true)
|
.defaultHelp(true)
|
||||||
.description("The Trogdor fault injection agent");
|
.description("The Trogdor fault injection agent");
|
||||||
parser.addArgument("--agent.config")
|
parser.addArgument("--agent.config", "-c")
|
||||||
.action(store())
|
.action(store())
|
||||||
.required(true)
|
.required(true)
|
||||||
.type(String.class)
|
.type(String.class)
|
||||||
.dest("config")
|
.dest("config")
|
||||||
.metavar("CONFIG")
|
.metavar("CONFIG")
|
||||||
.help("The configuration file to use.");
|
.help("The configuration file to use.");
|
||||||
parser.addArgument("--node-name")
|
parser.addArgument("--node-name", "-n")
|
||||||
.action(store())
|
.action(store())
|
||||||
.required(true)
|
.required(true)
|
||||||
.type(String.class)
|
.type(String.class)
|
||||||
|
|
|
@ -113,14 +113,14 @@ public final class Coordinator {
|
||||||
.newArgumentParser("trogdor-coordinator")
|
.newArgumentParser("trogdor-coordinator")
|
||||||
.defaultHelp(true)
|
.defaultHelp(true)
|
||||||
.description("The Trogdor fault injection coordinator");
|
.description("The Trogdor fault injection coordinator");
|
||||||
parser.addArgument("--coordinator.config")
|
parser.addArgument("--coordinator.config", "-c")
|
||||||
.action(store())
|
.action(store())
|
||||||
.required(true)
|
.required(true)
|
||||||
.type(String.class)
|
.type(String.class)
|
||||||
.dest("config")
|
.dest("config")
|
||||||
.metavar("CONFIG")
|
.metavar("CONFIG")
|
||||||
.help("The configuration file to use.");
|
.help("The configuration file to use.");
|
||||||
parser.addArgument("--node-name")
|
parser.addArgument("--node-name", "-n")
|
||||||
.action(store())
|
.action(store())
|
||||||
.required(true)
|
.required(true)
|
||||||
.type(String.class)
|
.type(String.class)
|
||||||
|
|
Loading…
Reference in New Issue