accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [03/10] git commit: ACCUMULO-1945 added help to bin/accumulo
Date Thu, 27 Mar 2014 05:07:02 GMT
ACCUMULO-1945 added help to bin/accumulo

Adding a check for the arg of help within the src/Main class should be sufficient for providing
the help argument to bin/accumulo

Signed-off-by: Sean Busbey <busbey@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3bf24042
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3bf24042
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3bf24042

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 3bf24042955db5cc05e0ddb5cbee7d0e5d1a1474
Parents: 4ee0f64
Author: Andrew George Wells <agwells0714@gmail.com>
Authored: Wed Mar 26 19:05:32 2014 -0400
Committer: Sean Busbey <busbey@cloudera.com>
Committed: Wed Mar 26 22:39:26 2014 -0500

----------------------------------------------------------------------
 src/start/src/main/java/org/apache/accumulo/start/Main.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bf24042/src/start/src/main/java/org/apache/accumulo/start/Main.java
----------------------------------------------------------------------
diff --git a/src/start/src/main/java/org/apache/accumulo/start/Main.java b/src/start/src/main/java/org/apache/accumulo/start/Main.java
index f955dd8..ab49f6a 100644
--- a/src/start/src/main/java/org/apache/accumulo/start/Main.java
+++ b/src/start/src/main/java/org/apache/accumulo/start/Main.java
@@ -39,7 +39,10 @@ public class Main {
       
       Thread.currentThread().setContextClassLoader(AccumuloClassLoader.getClassLoader());
       
-      if (args[0].equals("master")) {
+      if (args[0].equals("help")){
+        printUsage();
+        System.exit(0);
+      } else if (args[0].equals("master")) {
         runTMP = AccumuloClassLoader.loadClass("org.apache.accumulo.server.master.Master");
       } else if (args[0].equals("tserver")) {
         runTMP = AccumuloClassLoader.loadClass("org.apache.accumulo.server.tabletserver.TabletServer");
@@ -125,6 +128,6 @@ public class Main {
   }
 
   private static void printUsage() {
-    System.out.println("accumulo init | master | tserver | logger | monitor | shell | admin
| gc | classpath | <accumulo class> args");
+    System.out.println("accumulo init | master | tserver | logger | monitor | shell | admin
| gc | classpath | help | <accumulo class> args");
   }
 }


Mime
View raw message