Class LocalContainer
java.lang.Object
org.apache.storm.daemon.supervisor.Container
org.apache.storm.daemon.supervisor.LocalContainer
- All Implemented Interfaces:
- Killable
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.storm.daemon.supervisor.ContainerContainer.ContainerType
- 
Field SummaryFields inherited from class org.apache.storm.daemon.supervisor.Containerassignment, conf, containerMemoryTracker, ops, port, resourceIsolationManager, runAsUser, supervisorId, supervisorPort, symlinksDisabled, topoConf, topologyId, type, workerId
- 
Constructor SummaryConstructorsConstructorDescriptionLocalContainer(Map<String, Object> conf, String supervisorId, int supervisorPort, int port, LocalAssignment assignment, IContext sharedContext, StormMetricsRegistry metricsRegistry, ContainerMemoryTracker containerMemoryTracker, Supervisor.Iface localSupervisor) 
- 
Method SummaryModifier 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.ContainercleanUp, cleanUpForRestart, deleteSavedWorkerUser, forceKill, getMemoryReservationMb, getMemoryUsageMb, getTotalTopologyMemoryReserved, getTotalTopologyMemoryUsed, getTotalWorkersForThisTopology, getWorkerId, getWorkerUser, isMemoryLimitViolated, readHeartbeat, readTopoConf, saveWorkerUser, setup, toString, updateMemoryAccounting, writeLogMetadata
- 
Constructor Details- 
LocalContainerpublic 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- 
createArtifactsLinkprotected void createArtifactsLink()Description copied from class:ContainerCreate symlink from the containers directory/artifacts to the artifacts directory.- Overrides:
- createArtifactsLinkin class- Container
 
- 
createBlobstoreLinksprotected 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 class- Container
 
- 
launchDescription copied from class:ContainerLaunch the process for the first time. PREREQUISITE: setup has run and passed- Specified by:
- launchin class- Container
- Throws:
- IOException- on any error
 
- 
killDescription copied from interface:KillableKill the processes in this container nicely. kill -15 equivalent- Specified by:
- killin interface- Killable
- Overrides:
- killin class- Container
- Throws:
- IOException- on any error
 
- 
areAllProcessesDeadDescription copied from interface:KillableCheck whether all processes are dead.- Specified by:
- areAllProcessesDeadin interface- Killable
- Overrides:
- areAllProcessesDeadin class- Container
- Returns:
- true if all of the processes are dead, else false
- Throws:
- IOException- on any error
 
- 
relaunchDescription copied from class:ContainerRestart the processes in this container. PREREQUISITE: cleanUpForRestart has run and passed- Specified by:
- relaunchin class- Container
- Throws:
- IOException- on any error
 
- 
didMainProcessExitpublic 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 class- Container
 
- 
runProfilingpublic boolean runProfiling(ProfileRequest request, boolean stop) throws IOException, InterruptedException Description copied from class:ContainerRun a profiling request.- Specified by:
- runProfilingin class- Container
- Parameters:
- request- the request to run
- stop- is this a stop request?
- Returns:
- true if it succeeded, else false
- Throws:
- IOException- on any error
- InterruptedException- if running the command is interrupted.
 
 
-