BukrosSzabolcs commented on a change in pull request #675: HBASE-23085: Network
and Data related Actions
URL: https://github.com/apache/hbase/pull/675#discussion_r332060454
##########
File path:
hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java
##########
@@ -159,6 +169,38 @@ public void execute() throws IOException {
}
}
+ /**
+ * Executes commands over SSH
+ */
+ protected class RemoteSudoShell extends Shell.ShellCommandExecutor {
+ private String hostname;
+
+ public RemoteSudoShell(String hostname, String[] execString, long timeout)
{
+ this(hostname, execString, null, null, timeout);
+ }
+
+ public RemoteSudoShell(String hostname, String[] execString, File dir,
Map<String, String> env,
+ long timeout) {
+ super(execString, dir, env, timeout);
+ this.hostname = hostname;
+ }
+
+ @Override
+ public String[] getExecString() {
+ String at = sshUserName.isEmpty() ? "" : "@";
+ String remoteCmd = StringUtils.join(super.getExecString(), " ");
+ String cmd = String.format(tunnelSudoCmd, sshOptions, sshUserName, at,
hostname, remoteCmd,
+ timeOutInterval/1000f);
+ LOG.info("Executing full command [" + cmd + "]");
+ return new String[] { "/usr/bin/env", "bash", "-c", cmd };
+ }
+
+ @Override
+ public void execute() throws IOException {
+ super.execute();
+ }
Review comment:
You are right, it isn't. I'll remove it from both here and from RemoteShell.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services