public class ClientSupervisorUtils extends Object
Modifier and Type | Field and Description |
---|---|
static com.codahale.metrics.Meter |
numWorkerLaunchExceptions |
Constructor and Description |
---|
ClientSupervisorUtils() |
Modifier and Type | Method and Description |
---|---|
static Process |
launchProcess(List<String> command,
Map<String,String> environment,
String logPrefix,
ExitCodeCallback exitCodeCallback,
File dir)
Launch a new process as per
ProcessBuilder with a given callback. |
static int |
processLauncherAndWait(Map<String,Object> conf,
String user,
List<String> args,
Map<String,String> environment,
String logPreFix) |
static void |
setupStormCodeDir(Map<String,Object> conf,
String user,
String dir) |
static void |
setupWorkerArtifactsDir(Map<String,Object> conf,
String user,
String dir) |
public static final com.codahale.metrics.Meter numWorkerLaunchExceptions
public static int processLauncherAndWait(Map<String,Object> conf, String user, List<String> args, Map<String,String> environment, String logPreFix) throws IOException
IOException
public static Process launchProcess(List<String> command, Map<String,String> environment, String logPrefix, ExitCodeCallback exitCodeCallback, File dir) throws IOException
Launch a new process as per ProcessBuilder
with a given callback.
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 processIOException
ProcessBuilder
public static void setupStormCodeDir(Map<String,Object> conf, String user, String dir) throws IOException
IOException
public static void setupWorkerArtifactsDir(Map<String,Object> conf, String user, String dir) throws IOException
IOException
Copyright © 2019 The Apache Software Foundation. All rights reserved.