public abstract class ContainerLauncher extends Object
Modifier | Constructor and Description |
---|---|
protected |
ContainerLauncher() |
Modifier and Type | Method and Description |
---|---|
abstract Container |
launchContainer(int port,
LocalAssignment assignment,
LocalState state)
Launch a container in a given slot.
|
static ContainerLauncher |
make(Map<String,Object> conf,
String supervisorId,
int supervisorPort,
IContext sharedContext,
StormMetricsRegistry metricsRegistry,
ContainerMemoryTracker containerMemoryTracker,
Supervisor.Iface localSupervisor)
Factory to create the right container launcher
for the config and the environment.
|
abstract Container |
recoverContainer(int port,
LocalAssignment assignment,
LocalState state)
Recover a container for a running process.
|
abstract Killable |
recoverContainer(String workerId,
LocalState localState)
Try to recover a container using just the worker ID.
|
public static ContainerLauncher make(Map<String,Object> conf, String supervisorId, int supervisorPort, IContext sharedContext, StormMetricsRegistry metricsRegistry, ContainerMemoryTracker containerMemoryTracker, Supervisor.Iface localSupervisor) throws IOException
conf
- the configsupervisorId
- the ID of the supervisorsupervisorPort
- the parent supervisor thrift server portsharedContext
- Used in local mode to let workers talk together without nettymetricsRegistry
- The metrics registry.containerMemoryTracker
- The shared memory tracker for the supervisor's containerslocalSupervisor
- The local supervisor Thrift interface. Only used for local clusters, distributed clusters use Thrift directly.IOException
- on any errorpublic abstract Container launchContainer(int port, LocalAssignment assignment, LocalState state) throws IOException
port
- the port to run this onassignment
- what to launchstate
- the current state of the supervisorIOException
- on any errorpublic abstract Container recoverContainer(int port, LocalAssignment assignment, LocalState state) throws IOException, ContainerRecoveryException
port
- the port the assignment is running onassignment
- the assignment that was launchedstate
- the current state of the supervisorIOException
- on any errorContainerRecoveryException
- if the Container could not be recoveredpublic abstract Killable recoverContainer(String workerId, LocalState localState) throws IOException, ContainerRecoveryException
workerId
- the id of the worker to uselocalState
- the state of the running supervisorIOException
- on any errorContainerRecoveryException
- if the Container could not be recoveredCopyright © 2023 The Apache Software Foundation. All rights reserved.