kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsiva...@apache.org
Subject [kafka] branch trunk updated: MINOR: improve trogdor commandline (#4721)
Date Mon, 19 Mar 2018 11:55:36 GMT
This is an automated email from the ASF dual-hosted git repository.

rsivaram pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 0560193  MINOR: improve trogdor commandline (#4721)
0560193 is described below

commit 0560193706bf7c7dbe39d8baa65129d765ca9868
Author: Colin Patrick McCabe <colin@cmccabe.xyz>
AuthorDate: Mon Mar 19 04:55:29 2018 -0700

    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.
---
 config/trogdor.conf                                | 25 ++++++++++++++++++++++
 .../java/org/apache/kafka/trogdor/agent/Agent.java |  4 ++--
 .../kafka/trogdor/coordinator/Coordinator.java     |  4 ++--
 3 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/config/trogdor.conf b/config/trogdor.conf
new file mode 100644
index 0000000..320cbe7
--- /dev/null
+++ b/config/trogdor.conf
@@ -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
+        }
+    }
+}
diff --git a/tools/src/main/java/org/apache/kafka/trogdor/agent/Agent.java b/tools/src/main/java/org/apache/kafka/trogdor/agent/Agent.java
index b0fea87..3b5b21e 100644
--- a/tools/src/main/java/org/apache/kafka/trogdor/agent/Agent.java
+++ b/tools/src/main/java/org/apache/kafka/trogdor/agent/Agent.java
@@ -109,14 +109,14 @@ public final class Agent {
             .newArgumentParser("trogdor-agent")
             .defaultHelp(true)
             .description("The Trogdor fault injection agent");
-        parser.addArgument("--agent.config")
+        parser.addArgument("--agent.config", "-c")
             .action(store())
             .required(true)
             .type(String.class)
             .dest("config")
             .metavar("CONFIG")
             .help("The configuration file to use.");
-        parser.addArgument("--node-name")
+        parser.addArgument("--node-name", "-n")
             .action(store())
             .required(true)
             .type(String.class)
diff --git a/tools/src/main/java/org/apache/kafka/trogdor/coordinator/Coordinator.java b/tools/src/main/java/org/apache/kafka/trogdor/coordinator/Coordinator.java
index 545e3a3..b3418dd 100644
--- a/tools/src/main/java/org/apache/kafka/trogdor/coordinator/Coordinator.java
+++ b/tools/src/main/java/org/apache/kafka/trogdor/coordinator/Coordinator.java
@@ -113,14 +113,14 @@ public final class Coordinator {
             .newArgumentParser("trogdor-coordinator")
             .defaultHelp(true)
             .description("The Trogdor fault injection coordinator");
-        parser.addArgument("--coordinator.config")
+        parser.addArgument("--coordinator.config", "-c")
             .action(store())
             .required(true)
             .type(String.class)
             .dest("config")
             .metavar("CONFIG")
             .help("The configuration file to use.");
-        parser.addArgument("--node-name")
+        parser.addArgument("--node-name", "-n")
             .action(store())
             .required(true)
             .type(String.class)

-- 
To stop receiving notification emails like this one, please contact
rsivaram@apache.org.

Mime
View raw message