Class ClientSupervisorUtils
java.lang.Object
org.apache.storm.daemon.supervisor.ClientSupervisorUtils
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.codahale.metrics.Meter
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ProcesslaunchProcess(List<String> command, Map<String, String> environment, String logPrefix, ExitCodeCallback exitCodeCallback, File dir) Launch a new process as perProcessBuilderwith a given callback.static ProcessprocessLauncher(Map<String, Object> conf, String user, List<String> commandPrefix, List<String> args, Map<String, String> environment, String logPreFix, ExitCodeCallback exitCodeCallback, File dir) static intprocessLauncherAndWait(Map<String, Object> conf, String user, List<String> args, Map<String, String> environment, String logPreFix) static intprocessLauncherAndWait(Map<String, Object> conf, String user, List<String> args, Map<String, String> environment, String logPreFix, File dir) static voidstatic void
- 
Field Details- 
numWorkerLaunchExceptionspublic static final com.codahale.metrics.Meter numWorkerLaunchExceptions
 
- 
- 
Constructor Details- 
ClientSupervisorUtilspublic ClientSupervisorUtils()
 
- 
- 
Method Details- 
processLauncherAndWaitpublic static int processLauncherAndWait(Map<String, Object> conf, String user, List<String> args, Map<String, throws IOExceptionString> environment, String logPreFix) - Throws:
- IOException
 
- 
processLauncherAndWaitpublic static int processLauncherAndWait(Map<String, Object> conf, String user, List<String> args, Map<String, throws IOExceptionString> environment, String logPreFix, File dir) - Throws:
- IOException
 
- 
processLauncherpublic static Process processLauncher(Map<String, Object> conf, String user, List<String> commandPrefix, List<String> args, Map<String, throws IOExceptionString> environment, String logPreFix, ExitCodeCallback exitCodeCallback, File dir) - Throws:
- IOException
 
- 
launchProcesspublic static Process launchProcess(List<String> command, Map<String, String> environment, String logPrefix, ExitCodeCallback exitCodeCallback, File dir) throws IOExceptionLaunch a new process as perProcessBuilderwith a given callback.- Parameters:
- command- the command to be executed in the new process
- environment- the environment to be applied to the process. Can be null.
- logPrefix- a prefix for log entries from the output of the process. Can be null.
- exitCodeCallback- code to be called passing the exit code value when the process completes
- dir- the working directory of the new process
- Returns:
- the new process
- Throws:
- IOException
 
- 
setupStormCodeDirpublic static void setupStormCodeDir(Map<String, Object> conf, String user, String dir) throws IOException- Throws:
- IOException
 
- 
setupWorkerArtifactsDirpublic static void setupWorkerArtifactsDir(Map<String, Object> conf, String user, String dir) throws IOException- Throws:
- IOException
 
 
-