accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [1/3] accumulo git commit: ACCUMULO-3749 Set ACCUMULO_CONF_DIR when start/stop Accumulo
Date Fri, 24 Apr 2015 03:58:00 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.7 523d11b1b -> ea25e98c9
  refs/heads/master a72b0d39a -> 6df71693e


ACCUMULO-3749 Set ACCUMULO_CONF_DIR when start/stop Accumulo


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

Branch: refs/heads/1.7
Commit: ea25e98c980d58b04f3d490311f82f72463f478f
Parents: 523d11b
Author: Josh Elser <elserj@apache.org>
Authored: Thu Apr 23 21:15:30 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Thu Apr 23 21:15:55 2015 -0400

----------------------------------------------------------------------
 .../accumulo/cluster/standalone/StandaloneClusterControl.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ea25e98c/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
index 97f99a3..8779878 100644
--- a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
@@ -49,6 +49,7 @@ public class StandaloneClusterControl implements ClusterControl {
   private static final String START_SERVER_SCRIPT = "start-server.sh", ACCUMULO_SCRIPT =
"accumulo", TOOL_SCRIPT = "tool.sh";
   private static final String MASTER_HOSTS_FILE = "masters", GC_HOSTS_FILE = "gc", TSERVER_HOSTS_FILE
= "slaves", TRACER_HOSTS_FILE = "tracers",
       MONITOR_HOSTS_FILE = "monitor";
+  private static final String ACCUMULO_CONF_DIR = "ACCUMULO_CONF_DIR=";
 
   protected String user;
   protected String accumuloHome, accumuloConfDir;
@@ -139,7 +140,7 @@ public class StandaloneClusterControl implements ClusterControl {
   public void adminStopAll() throws IOException {
     File confDir = getConfDir();
     String master = getHosts(new File(confDir, "masters")).get(0);
-    String[] cmd = new String[] {SUDO_CMD, "-u", user, accumuloPath, Admin.class.getName(),
"stopAll"};
+    String[] cmd = new String[] {ACCUMULO_CONF_DIR + accumuloConfDir, SUDO_CMD, "-u", user,
accumuloPath, Admin.class.getName(), "stopAll"};
     Entry<Integer,String> pair = exec(master, cmd);
     if (0 != pair.getKey().intValue()) {
       throw new IOException("stopAll did not finish successfully, retcode=" + pair.getKey()
+ ", stdout=" + pair.getValue());
@@ -192,7 +193,7 @@ public class StandaloneClusterControl implements ClusterControl {
 
   @Override
   public void start(ServerType server, String hostname) throws IOException {
-    String[] cmd = new String[] {SUDO_CMD, "-u", user, startServerPath, hostname, getProcessString(server)};
+    String[] cmd = new String[] {ACCUMULO_CONF_DIR + accumuloConfDir, SUDO_CMD, "-u", user,
startServerPath, hostname, getProcessString(server)};
     Entry<Integer,String> pair = exec(hostname, cmd);
     if (0 != pair.getKey()) {
       throw new IOException("Start " + server + " on " + hostname + " failed for execute
successfully");


Mime
View raw message