org.apache.storm.daemon.supervisor

## Class ClientSupervisorUtils

- java.lang.Object
- - org.apache.storm.daemon.supervisor.ClientSupervisorUtils

-     public class ClientSupervisorUtils
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static com.codahale.metrics.Meter` | `numWorkerLaunchExceptions`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientSupervisorUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    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 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` | `setupStormCodeDir(Map<String,Object> conf, String user, String dir)`
    `static void` | `setupWorkerArtifactsDir(Map<String,Object> conf, String user, String dir)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### numWorkerLaunchExceptions

          public static final com.codahale.metrics.Meter numWorkerLaunchExceptions

  - ### Constructor Detail

    - #### ClientSupervisorUtils

          public ClientSupervisorUtils()

  - ### Method Detail

    - #### processLauncherAndWait

          public static int processLauncherAndWait(Map<String,Object> conf,
                                                   String user,
                                                   List<String> args,
                                                   Map<String,String> environment,
                                                   String logPreFix)
                                            throws IOException

      Throws:
        `IOException`

    - #### processLauncherAndWait

          public static int processLauncherAndWait(Map<String,Object> conf,
                                                   String user,
                                                   List<String> args,
                                                   Map<String,String> environment,
                                                   String logPreFix,
                                                   File dir)
                                            throws IOException

      Throws:
        `IOException`

    - #### processLauncher

          public 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)
                                         throws IOException

      Throws:
        `IOException`

    - #### launchProcess

          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.

      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`

    - #### 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`

Copyright © 2021 The Apache Software Foundation. All rights reserved.