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.ShellCommandExecutorExecute a command, leveraging Hadoop'sShell.ShellCommandExecutor, on a remote host. SSH configuration provided byRemoteShellOptions.
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringhostnameprotected RemoteShellOptionsoptions-
Fields inherited from class org.apache.hadoop.util.Shell
ENV_HADOOP_HOME, ENV_NAME_REGEX, 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, SYSPROP_HADOOP_HOME_DIR, timeOutInterval, TOKEN_SEPARATOR_REGEX, USER_NAME_COMMAND, WINDOWS, WINDOWS_MAX_SHELL_LENGHT, WINDOWS_MAX_SHELL_LENGTH, 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 voidexecute()String[]getExecString()RemoteShellOptionsgetRemoteShellOptions()voidsetRemoteShellOptions(RemoteShellOptions options)-
Methods inherited from class org.apache.hadoop.util.Shell.ShellCommandExecutor
close, getOutput, getTimeoutInterval, parseExecResult, toString
-
Methods inherited from class org.apache.hadoop.util.Shell
appendScriptExtension, appendScriptExtension, checkIsBashSupported, checkWindowsCommandLineLength, destroyAllShellProcesses, execCommand, execCommand, execCommand, getAllShells, getCheckProcessIsAliveCommand, getEnvironment, getEnvironmentVariableRegex, getExitCode, getGetPermissionCommand, getGroupsCommand, getGroupsForUserCommand, getGroupsIDForUserCommand, getHadoopHome, getMemlockLimit, getProcess, getQualifiedBin, getQualifiedBinPath, getReadlinkCommand, getRunScriptCommand, getSetOwnerCommand, getSetPermissionCommand, getSetPermissionCommand, getSignalKillCommand, getSymlinkCommand, getUsersForNetgroupCommand, getWaitingThread, getWinUtilsFile, getWinUtilsPath, hasWinutilsPath, isJava7OrAbove, isJavaVersionAtLeast, 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:
getExecStringin classorg.apache.hadoop.util.Shell.ShellCommandExecutor
-
execute
public void execute() throws IOException- Specified by:
executein interfaceorg.apache.hadoop.util.Shell.CommandExecutor- Overrides:
executein classorg.apache.hadoop.util.Shell.ShellCommandExecutor- Throws:
IOException
-
-