Class LocalContainerLauncher
java.lang.Object
org.apache.storm.daemon.supervisor.ContainerLauncher
org.apache.storm.daemon.supervisor.LocalContainerLauncher
Launch Containers in local mode.
- 
Constructor SummaryConstructorsConstructorDescriptionLocalContainerLauncher(Map<String, Object> conf, String supervisorId, int supervisorPort, IContext sharedContext, StormMetricsRegistry metricsRegistry, ContainerMemoryTracker containerMemoryTracker, Supervisor.Iface localSupervisor) 
- 
Method SummaryModifier and TypeMethodDescriptionlaunchContainer(int port, LocalAssignment assignment, LocalState state) Launch a container in a given slot.recoverContainer(int port, LocalAssignment assignment, LocalState state) Recover a container for a running process.recoverContainer(String workerId, LocalState localState) Try to recover a container using just the worker ID.Methods inherited from class org.apache.storm.daemon.supervisor.ContainerLaunchermake
- 
Constructor Details- 
LocalContainerLauncherpublic LocalContainerLauncher(Map<String, Object> conf, String supervisorId, int supervisorPort, IContext sharedContext, StormMetricsRegistry metricsRegistry, ContainerMemoryTracker containerMemoryTracker, Supervisor.Iface localSupervisor) 
 
- 
- 
Method Details- 
launchContainerpublic Container launchContainer(int port, LocalAssignment assignment, LocalState state) throws IOException Description copied from class:ContainerLauncherLaunch a container in a given slot.- Specified by:
- launchContainerin 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
 
- 
recoverContainerpublic Container recoverContainer(int port, LocalAssignment assignment, LocalState state) throws IOException Description copied from class:ContainerLauncherRecover a container for a running process.- Specified by:
- recoverContainerin 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
 
- 
recoverContainerDescription copied from class:ContainerLauncherTry 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:
- recoverContainerin 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
 
 
-