hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1471804 - in /hbase/trunk: hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java src/main/docbkx/developer.xml
Date Thu, 25 Apr 2013 01:36:29 GMT
Author: sershe
Date: Thu Apr 25 01:36:29 2013
New Revision: 1471804

URL: http://svn.apache.org/r1471804
Log:
HBASE-8405 Add more custom options to how ClusterManager runs commands

Modified:
    hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java
    hbase/trunk/src/main/docbkx/developer.xml

Modified: hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java?rev=1471804&r1=1471803&r2=1471804&view=diff
==============================================================================
--- hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java (original)
+++ hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java Thu
Apr 25 01:36:29 2013
@@ -40,6 +40,7 @@ import org.apache.hadoop.util.Shell;
 public class HBaseClusterManager extends ClusterManager {
   private String sshUserName;
   private String sshOptions;
+  private String sshBeforeCommand;
 
   @Override
   public void setConf(Configuration conf) {
@@ -54,6 +55,10 @@ public class HBaseClusterManager extends
     if (!extraSshOptions.isEmpty()) {
       sshOptions = StringUtils.join(new Object[] { sshOptions, extraSshOptions }, " ");
     }
+    sshBeforeCommand =  conf.get("hbase.it.clustermanager.ssh.beforeCommand", "");
+    if (!sshBeforeCommand.isEmpty()) {
+      sshBeforeCommand += " && ";
+    }
     LOG.info("Running with SSH user [" + sshUserName + "] and options [" + sshOptions + "]");
   }
 
@@ -61,7 +66,6 @@ public class HBaseClusterManager extends
    * Executes commands over SSH
    */
   protected class RemoteShell extends Shell.ShellCommandExecutor {
-
     private String hostname;
 
     private String sshCmd = "/usr/bin/ssh";
@@ -95,7 +99,7 @@ public class HBaseClusterManager extends
           StringUtils.join(new String[] { sshCmd,
               (sshOptions == null) ? "" : sshOptions,
               userAndHost,
-              "\"" + StringUtils.join(super.getExecString(), " ") + "\""
+              "\"" + sshBeforeCommand + StringUtils.join(super.getExecString(), " ") + "\""
           }, " ")};
     }
 

Modified: hbase/trunk/src/main/docbkx/developer.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/docbkx/developer.xml?rev=1471804&r1=1471803&r2=1471804&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message