Package org.apache.storm.utils
Class ShellProcess
java.lang.Object
org.apache.storm.utils.ShellProcess
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.slf4j.Logger
static org.slf4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
int
Get exit code.getPid()
Get PID.launch
(Map<String, Object> conf, TopologyContext context) launch
(Map<String, Object> conf, TopologyContext context, boolean changeDirectory) void
void
void
writeBoltMsg
(BoltMsg msg) void
writeSpoutMsg
(SpoutMsg msg) void
writeTaskIds
(List<Integer> taskIds)
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG -
ShellLogger
public static org.slf4j.Logger ShellLogger -
serializer
-
pid
-
componentName
-
-
Constructor Details
-
ShellProcess
-
-
Method Details
-
setEnv
-
launch
-
launch
-
destroy
public void destroy() -
readShellMsg
- Throws:
IOException
-
writeBoltMsg
- Throws:
IOException
-
writeSpoutMsg
- Throws:
IOException
-
writeTaskIds
- Throws:
IOException
-
logErrorStream
public void logErrorStream() -
getErrorsString
-
getPid
Get PID.- Returns:
- pid, if the process has been launched, null otherwise.
-
getComponentName
-
getExitCode
public int getExitCode()Get exit code.- Returns:
- exit code of the process if process is terminated, -1 if process is not started or terminated.
-
getProcessInfoString
-
getProcessTerminationInfoString
-