Class LocalContainer
- java.lang.Object
-
- org.apache.storm.daemon.supervisor.Container
-
- org.apache.storm.daemon.supervisor.LocalContainer
-
-
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
Constructors Constructor Description LocalContainer(Map<String,Object> conf, String supervisorId, int supervisorPort, int port, LocalAssignment assignment, IContext sharedContext, StormMetricsRegistry metricsRegistry, ContainerMemoryTracker containerMemoryTracker, Supervisor.Iface localSupervisor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanareAllProcessesDead()Check whether all processes are dead.protected voidcreateArtifactsLink()Create symlink from the containers directory/artifacts to the artifacts directory.protected voidcreateBlobstoreLinks()Create symlinks for each of the blobs from the container's directory to corresponding links in the storm dist directory.booleandidMainProcessExit()Return 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 Detail
-
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 Detail
-
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
public void launch() throws IOExceptionDescription 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
public void kill() throws IOExceptionDescription 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
public boolean areAllProcessesDead() throws IOExceptionDescription 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
public void relaunch() throws IOExceptionDescription 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.
-
-