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 boolean
areAllProcessesDead()
Check whether all processes are dead.protected void
createArtifactsLink()
Create symlink from the containers directory/artifacts to the artifacts directory.protected void
createBlobstoreLinks()
Create symlinks for each of the blobs from the container's directory to corresponding links in the storm dist directory.boolean
didMainProcessExit()
Return true if the main process exited, else false.void
kill()
Kill the processes in this container nicely.void
launch()
Launch the process for the first time.void
relaunch()
Restart the processes in this container.boolean
runProfiling(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:Container
Create symlink from the containers directory/artifacts to the artifacts directory.- Overrides:
createArtifactsLink
in classContainer
-
createBlobstoreLinks
protected void createBlobstoreLinks()
Description copied from class:Container
Create symlinks for each of the blobs from the container's directory to corresponding links in the storm dist directory.- Overrides:
createBlobstoreLinks
in classContainer
-
launch
public void launch() throws IOException
Description copied from class:Container
Launch the process for the first time. PREREQUISITE: setup has run and passed- Specified by:
launch
in classContainer
- Throws:
IOException
- on any error
-
kill
public void kill() throws IOException
Description copied from interface:Killable
Kill the processes in this container nicely. kill -15 equivalent- Specified by:
kill
in interfaceKillable
- Overrides:
kill
in classContainer
- Throws:
IOException
- on any error
-
areAllProcessesDead
public boolean areAllProcessesDead() throws IOException
Description copied from interface:Killable
Check whether all processes are dead.- Specified by:
areAllProcessesDead
in interfaceKillable
- Overrides:
areAllProcessesDead
in classContainer
- Returns:
- true if all of the processes are dead, else false
- Throws:
IOException
- on any error
-
relaunch
public void relaunch() throws IOException
Description copied from class:Container
Restart the processes in this container. PREREQUISITE: cleanUpForRestart has run and passed- Specified by:
relaunch
in classContainer
- Throws:
IOException
- on any error
-
didMainProcessExit
public boolean didMainProcessExit()
Description copied from class:Container
Return true if the main process exited, else false. This is just best effort return false if unknown.- Specified by:
didMainProcessExit
in classContainer
-
runProfiling
public boolean runProfiling(ProfileRequest request, boolean stop) throws IOException, InterruptedException
Description copied from class:Container
Run a profiling request.- Specified by:
runProfiling
in 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.
-
-