org.apache.storm.daemon.supervisor

## Class BasicContainerLauncher

- java.lang.Object
- - org.apache.storm.daemon.supervisor.ContainerLauncher
  - - org.apache.storm.daemon.supervisor.BasicContainerLauncher

-     public class BasicContainerLauncher
      extends ContainerLauncher

  Launch containers with no security using standard java commands.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ResourceIsolationInterface` | `resourceIsolationManager`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicContainerLauncher(Map<String,Object> conf, String supervisorId, int supervisorPort, ResourceIsolationInterface resourceIsolationManager, StormMetricsRegistry metricsRegistry, ContainerMemoryTracker containerMemoryTracker)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Container` | `launchContainer(int port, LocalAssignment assignment, LocalState state)` Launch a container in a given slot.
    `Container` | `recoverContainer(int port, LocalAssignment assignment, LocalState state)` Recover a container for a running process.
    `Killable` | `recoverContainer(String workerId, LocalState localState)` Try to recover a container using just the worker ID. The result is really only useful for killing the container and so is returning a Killable.

    - ### Methods inherited from class org.apache.storm.daemon.supervisor.ContainerLauncher

      `make`

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

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

- - ### Field Detail

    - #### resourceIsolationManager

          protected final ResourceIsolationInterface resourceIsolationManager

  - ### Constructor Detail

    - #### BasicContainerLauncher

          public BasicContainerLauncher(Map<String,Object> conf,
                                        String supervisorId,
                                        int supervisorPort,
                                        ResourceIsolationInterface resourceIsolationManager,
                                        StormMetricsRegistry metricsRegistry,
                                        ContainerMemoryTracker containerMemoryTracker)
                                 throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### launchContainer

          public Container launchContainer(int port,
                                           LocalAssignment assignment,
                                           LocalState state)
                                    throws IOException

      Description copied from class: `ContainerLauncher`

      Launch a container in a given slot.

      Specified by:
        `launchContainer` in class `ContainerLauncher`
      Parameters:
        `port` - the port to run this on
        `assignment` - what to launch
        `state` - the current state of the supervisor
      Returns:
        The container that can be used to manager the processes.
      Throws:
        `IOException` - on any error

    - #### recoverContainer

          public Container recoverContainer(int port,
                                            LocalAssignment assignment,
                                            LocalState state)
                                     throws IOException

      Description copied from class: `ContainerLauncher`

      Recover a container for a running process.

      Specified by:
        `recoverContainer` in class `ContainerLauncher`
      Parameters:
        `port` - the port the assignment is running on
        `assignment` - the assignment that was launched
        `state` - the current state of the supervisor
      Returns:
        The container that can be used to manage the processes.
      Throws:
        `IOException` - on any error

    - #### recoverContainer

          public Killable recoverContainer(String workerId,
                                           LocalState localState)
                                    throws IOException

      Description copied from class: `ContainerLauncher`

      Try to recover a container using just the worker ID.
      The result is really only useful for killing the container and so is returning a Killable. Even if a Container is returned do not case the result to Container because only the Killable APIs are guaranteed to work.

      Specified by:
        `recoverContainer` in class `ContainerLauncher`
      Parameters:
        `workerId` - the id of the worker to use
        `localState` - the state of the running supervisor
      Returns:
        a Killable that can be used to kill the underlying container.
      Throws:
        `IOException` - on any error

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