Container.ContainerType
assignment, conf, containerMemoryTracker, ops, port, resourceIsolationManager, supervisorId, supervisorPort, symlinksDisabled, topoConf, topologyId, type, workerId
Constructor and Description |
---|
LocalContainer(Map<String,Object> conf,
String supervisorId,
int supervisorPort,
int port,
LocalAssignment assignment,
IContext sharedContext,
StormMetricsRegistry metricsRegistry,
ContainerMemoryTracker containerMemoryTracker,
Supervisor.Iface localSupervisor) |
Modifier and Type | Method and 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.
|
cleanUp, cleanUpForRestart, deleteSavedWorkerUser, forceKill, forceKill, getAllPids, getMemoryReservationMb, getMemoryUsageMb, getRunWorkerAsUser, getTotalTopologyMemoryReserved, getTotalTopologyMemoryUsed, getTotalWorkersForThisTopology, getWorkerId, getWorkerUser, isMemoryLimitViolated, isProcessAlive, kill, readHeartbeat, readTopoConf, saveWorkerUser, setup, toString, updateMemoryAccounting, writeLogMetadata
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
IOException
protected void createArtifactsLink()
Container
Create symlink from the containers directory/artifacts to the artifacts directory.
createArtifactsLink
in class Container
protected void createBlobstoreLinks()
Container
Create symlinks for each of the blobs from the container’s directory to corresponding links in the storm dist directory.
createBlobstoreLinks
in class Container
public void launch() throws IOException
Container
Launch the process for the first time. PREREQUISITE: setup has run and passed
launch
in class Container
IOException
- on any errorpublic void kill() throws IOException
Killable
Kill the processes in this container nicely. kill -15 equivalent
kill
in interface Killable
kill
in class Container
IOException
- on any errorpublic boolean areAllProcessesDead() throws IOException
Killable
Check whether all processes are dead.
areAllProcessesDead
in interface Killable
areAllProcessesDead
in class Container
IOException
- on any errorpublic void relaunch() throws IOException
Container
Restart the processes in this container. PREREQUISITE: cleanUpForRestart has run and passed
relaunch
in class Container
IOException
- on any errorpublic boolean didMainProcessExit()
Container
Return true if the main process exited, else false. This is just best effort return false if unknown.
didMainProcessExit
in class Container
public boolean runProfiling(ProfileRequest request, boolean stop) throws IOException, InterruptedException
Container
Run a profiling request.
runProfiling
in class Container
request
- the request to runstop
- is this a stop request?IOException
- on any errorInterruptedException
- if running the command is interrupted.Copyright © 2020 The Apache Software Foundation. All rights reserved.