Class ClientSupervisorUtils
java.lang.Object
org.apache.storm.daemon.supervisor.ClientSupervisorUtils
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.codahale.metrics.Meter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Process
launchProcess
(List<String> command, Map<String, String> environment, String logPrefix, ExitCodeCallback exitCodeCallback, File dir) Launch a new process as perProcessBuilder
with a given callback.static Process
processLauncher
(Map<String, Object> conf, String user, List<String> commandPrefix, List<String> args, Map<String, String> environment, String logPreFix, ExitCodeCallback exitCodeCallback, File dir) static int
processLauncherAndWait
(Map<String, Object> conf, String user, List<String> args, Map<String, String> environment, String logPreFix) static int
processLauncherAndWait
(Map<String, Object> conf, String user, List<String> args, Map<String, String> environment, String logPreFix, File dir) static void
static void
-
Field Details
-
numWorkerLaunchExceptions
public static final com.codahale.metrics.Meter numWorkerLaunchExceptions
-
-
Constructor Details
-
ClientSupervisorUtils
public ClientSupervisorUtils()
-
-
Method Details
-
processLauncherAndWait
public static int processLauncherAndWait(Map<String, Object> conf, String user, List<String> args, Map<String, throws IOExceptionString> environment, String logPreFix) - Throws:
IOException
-
processLauncherAndWait
public static int processLauncherAndWait(Map<String, Object> conf, String user, List<String> args, Map<String, throws IOExceptionString> environment, String logPreFix, File dir) - Throws:
IOException
-
processLauncher
public 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
-
launchProcess
public static Process launchProcess(List<String> command, Map<String, String> environment, String logPrefix, ExitCodeCallback exitCodeCallback, File dir) throws IOExceptionLaunch a new process as perProcessBuilder
with a given callback.- Parameters:
command
- the command to be executed in the new processenvironment
- 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 completesdir
- the working directory of the new process- Returns:
- the new process
- Throws:
IOException
-
setupStormCodeDir
public static void setupStormCodeDir(Map<String, Object> conf, String user, String dir) throws IOException- Throws:
IOException
-
setupWorkerArtifactsDir
public static void setupWorkerArtifactsDir(Map<String, Object> conf, String user, String dir) throws IOException- Throws:
IOException
-