Class LocalContainer
java.lang.Object
org.apache.storm.daemon.supervisor.Container
org.apache.storm.daemon.supervisor.LocalContainer
- All Implemented Interfaces:
Killable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.storm.daemon.supervisor.Container
Container.ContainerType -
Field Summary
Fields inherited from class org.apache.storm.daemon.supervisor.Container
assignment, conf, containerMemoryTracker, ops, port, resourceIsolationManager, runAsUser, supervisorId, supervisorPort, symlinksDisabled, topoConf, topologyId, type, workerId -
Constructor Summary
ConstructorsConstructorDescriptionLocalContainer(Map<String, Object> conf, String supervisorId, int supervisorPort, int port, LocalAssignment assignment, IContext sharedContext, StormMetricsRegistry metricsRegistry, ContainerMemoryTracker containerMemoryTracker, Supervisor.Iface localSupervisor) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck whether all processes are dead.protected voidCreate symlink from the containers directory/artifacts to the artifacts directory.protected voidCreate symlinks for each of the blobs from the container's directory to corresponding links in the storm dist directory.booleanReturn true if the main process exited, else false.voidkill()Kill the processes in this container nicely.voidlaunch()Launch the process for the first time.voidrelaunch()Restart the processes in this container.booleanrunProfiling(ProfileRequest request, boolean stop) Run a profiling request.Methods inherited from class org.apache.storm.daemon.supervisor.Container
cleanUp, cleanUpForRestart, deleteSavedWorkerUser, forceKill, getMemoryReservationMb, getMemoryUsageMb, getTotalTopologyMemoryReserved, getTotalTopologyMemoryUsed, getTotalWorkersForThisTopology, getWorkerId, getWorkerUser, isMemoryLimitViolated, readHeartbeat, readTopoConf, saveWorkerUser, setup, toString, updateMemoryAccounting, writeLogMetadata
-
Constructor Details
-
LocalContainer
public LocalContainer(Map<String, Object> conf, String supervisorId, int supervisorPort, int port, LocalAssignment assignment, IContext sharedContext, StormMetricsRegistry metricsRegistry, ContainerMemoryTracker containerMemoryTracker, Supervisor.Iface localSupervisor) throws IOException- Throws:
IOException
-
-
Method Details
-
createArtifactsLink
protected void createArtifactsLink()Description copied from class:ContainerCreate symlink from the containers directory/artifacts to the artifacts directory.- Overrides:
createArtifactsLinkin classContainer
-
createBlobstoreLinks
protected void createBlobstoreLinks()Description copied from class:ContainerCreate symlinks for each of the blobs from the container's directory to corresponding links in the storm dist directory.- Overrides:
createBlobstoreLinksin classContainer
-
launch
Description copied from class:ContainerLaunch the process for the first time. PREREQUISITE: setup has run and passed- Specified by:
launchin classContainer- Throws:
IOException- on any error
-
kill
Description copied from interface:KillableKill the processes in this container nicely. kill -15 equivalent- Specified by:
killin interfaceKillable- Overrides:
killin classContainer- Throws:
IOException- on any error
-
areAllProcessesDead
Description copied from interface:KillableCheck whether all processes are dead.- Specified by:
areAllProcessesDeadin interfaceKillable- Overrides:
areAllProcessesDeadin classContainer- Returns:
- true if all of the processes are dead, else false
- Throws:
IOException- on any error
-
relaunch
Description copied from class:ContainerRestart the processes in this container. PREREQUISITE: cleanUpForRestart has run and passed- Specified by:
relaunchin classContainer- Throws:
IOException- on any error
-
didMainProcessExit
public boolean didMainProcessExit()Description copied from class:ContainerReturn true if the main process exited, else false. This is just best effort return false if unknown.- Specified by:
didMainProcessExitin classContainer
-
runProfiling
public boolean runProfiling(ProfileRequest request, boolean stop) throws IOException, InterruptedException Description copied from class:ContainerRun a profiling request.- Specified by:
runProfilingin classContainer- Parameters:
request- the request to runstop- is this a stop request?- Returns:
- true if it succeeded, else false
- Throws:
IOException- on any errorInterruptedException- if running the command is interrupted.
-