Package org.apache.storm.utils
Class ShellCommandRunnerImpl
java.lang.Object
org.apache.storm.utils.ShellCommandRunnerImpl
- All Implemented Interfaces:
- ShellCommandRunner
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionexecCommand(String... cmd) Method to execute a shell command.execCommand(Map<String, String> env, String... cmd) Method to execute a shell command.execCommand(Map<String, String> env, String[] cmd, long timeout) Method to execute a shell command.Token separator regex used to parse Shell tool outputs.
- 
Constructor Details- 
ShellCommandRunnerImplpublic ShellCommandRunnerImpl()
 
- 
- 
Method Details- 
execCommandDescription copied from interface:ShellCommandRunnerMethod to execute a shell command. Covers most of the simple cases without requiring the user to implement theShellUtilsinterface.- Specified by:
- execCommandin interface- ShellCommandRunner
- Parameters:
- cmd- shell command to execute.
- Returns:
- the output of the executed command.
- Throws:
- IOException
 
- 
execCommandDescription copied from interface:ShellCommandRunnerMethod to execute a shell command. Covers most of the simple cases without requiring the user to implement theShellUtilsinterface.- Specified by:
- execCommandin interface- ShellCommandRunner
- Parameters:
- env- the map of environment key=value
- cmd- shell command to execute.
- timeout- time in milliseconds after which script should be marked timeout
- Returns:
- the output of the executed command.
- Throws:
- IOException
 
- 
execCommandDescription copied from interface:ShellCommandRunnerMethod to execute a shell command. Covers most of the simple cases without requiring the user to implement theShellUtilsinterface.- Specified by:
- execCommandin interface- ShellCommandRunner
- Parameters:
- env- the map of environment key=value
- cmd- shell command to execute.
- Returns:
- the output of the executed command.
- Throws:
- IOException
 
- 
getTokenSeparatorRegexDescription copied from interface:ShellCommandRunnerToken separator regex used to parse Shell tool outputs.- Specified by:
- getTokenSeparatorRegexin interface- ShellCommandRunner
 
 
-