Package org.apache.accumulo.cluster
Class RemoteShell
- java.lang.Object
-
- org.apache.hadoop.util.Shell
-
- org.apache.hadoop.util.Shell.ShellCommandExecutor
-
- org.apache.accumulo.cluster.RemoteShell
-
- All Implemented Interfaces:
org.apache.hadoop.util.Shell.CommandExecutor
public class RemoteShell extends org.apache.hadoop.util.Shell.ShellCommandExecutor
Execute a command, leveraging Hadoop'sShell.ShellCommandExecutor
, on a remote host. SSH configuration provided byRemoteShellOptions
.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
hostname
protected RemoteShellOptions
options
-
Fields inherited from class org.apache.hadoop.util.Shell
FREEBSD, inheritParentEnv, isSetsidAvailable, LINK_COMMAND, LINUX, LOG, MAC, osType, OTHER, PPC_64, READ_LINK_COMMAND, SET_GROUP_COMMAND, SET_OWNER_COMMAND, SET_PERMISSION_COMMAND, SOLARIS, timeOutInterval, TOKEN_SEPARATOR_REGEX, USER_NAME_COMMAND, WINDOWS, WINDOWS_MAX_SHELL_LENGHT, WindowsProcessLaunchLock, WINUTILS
-
-
Constructor Summary
Constructors Constructor Description RemoteShell(String hostname, String[] execString, File dir, Map<String,String> env, long timeout, RemoteShellOptions options)
RemoteShell(String hostname, String[] execString, File dir, Map<String,String> env, RemoteShellOptions options)
RemoteShell(String hostname, String[] execString, File dir, RemoteShellOptions options)
RemoteShell(String hostname, String[] execString, RemoteShellOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
String[]
getExecString()
RemoteShellOptions
getRemoteShellOptions()
void
setRemoteShellOptions(RemoteShellOptions options)
-
Methods inherited from class org.apache.hadoop.util.Shell.ShellCommandExecutor
close, getOutput, parseExecResult, toString
-
Methods inherited from class org.apache.hadoop.util.Shell
appendScriptExtension, appendScriptExtension, checkWindowsCommandLineLength, execCommand, execCommand, execCommand, getCheckProcessIsAliveCommand, getEnvironment, getEnvironmentVariableRegex, getExitCode, getGetPermissionCommand, getGroupsCommand, getGroupsForUserCommand, getHadoopHome, getProcess, getQualifiedBinPath, getReadlinkCommand, getRunScriptCommand, getSetOwnerCommand, getSetPermissionCommand, getSetPermissionCommand, getSignalKillCommand, getSymlinkCommand, getUsersForNetgroupCommand, getWinUtilsPath, isJava7OrAbove, isTimedOut, run, setEnvironment, setWorkingDirectory
-
-
-
-
Field Detail
-
options
protected RemoteShellOptions options
-
hostname
protected String hostname
-
-
Constructor Detail
-
RemoteShell
public RemoteShell(String hostname, String[] execString, File dir, Map<String,String> env, long timeout, RemoteShellOptions options)
-
RemoteShell
public RemoteShell(String hostname, String[] execString, File dir, Map<String,String> env, RemoteShellOptions options)
-
RemoteShell
public RemoteShell(String hostname, String[] execString, File dir, RemoteShellOptions options)
-
RemoteShell
public RemoteShell(String hostname, String[] execString, RemoteShellOptions options)
-
-
Method Detail
-
setRemoteShellOptions
public void setRemoteShellOptions(RemoteShellOptions options)
-
getRemoteShellOptions
public RemoteShellOptions getRemoteShellOptions()
-
getExecString
public String[] getExecString()
- Overrides:
getExecString
in classorg.apache.hadoop.util.Shell.ShellCommandExecutor
-
execute
public void execute() throws IOException
- Specified by:
execute
in interfaceorg.apache.hadoop.util.Shell.CommandExecutor
- Overrides:
execute
in classorg.apache.hadoop.util.Shell.ShellCommandExecutor
- Throws:
IOException
-
-