public class RunAsUserContainer extends BasicContainer
Container.ContainerTypeexitedEarly, hardMemoryLimitMultiplier, hardMemoryLimitOver, localState, lowMemoryThresholdMb, mediumMemoryGracePeriodMs, mediumMemoryThresholdMb, memoryLimitExceededStart, memoryLimitMb, profileCmd, stormHomeassignment, conf, containerMemoryTracker, ops, port, resourceIsolationManager, supervisorId, supervisorPort, symlinksDisabled, topoConf, topologyId, type, workerId| Constructor and Description |
|---|
RunAsUserContainer(Container.ContainerType type,
Map<String,Object> conf,
String supervisorId,
int supervisorPort,
int port,
LocalAssignment assignment,
ResourceIsolationInterface resourceIsolationManager,
LocalState localState,
String workerId,
StormMetricsRegistry metricsRegistry,
ContainerMemoryTracker containerMemoryTracker) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
forceKill(long pid)
Kill a given process.
|
protected String |
getRunWorkerAsUser()
If ‘supervisor.run.worker.as.user’ is set, worker will be launched as the user that launched the topology.
|
protected void |
kill(long pid)
Kill a given process.
|
protected void |
launchWorkerProcess(List<String> command,
Map<String,String> env,
String logPrefix,
ExitCodeCallback processExitCallback,
File targetDir)
Launch the worker process (non-blocking).
|
protected boolean |
runProfilingCommand(List<String> command,
Map<String,String> env,
String logPrefix,
File targetDir)
Run the given command for profiling.
|
cleanUpForRestart, createNewWorkerId, didMainProcessExit, frameworkClasspath, getDependencyLocationsFor, getMemoryReservationMb, getMemoryUsageMb, getStormVersionFor, getWildcardDir, getWorkerClassPath, getWorkerLogWriter, getWorkerMain, isMemoryLimitViolated, javaCmd, javaLibraryPath, launch, relaunch, runProfiling, substituteChildopts, substituteChildoptsareAllProcessesDead, cleanUp, createArtifactsLink, createBlobstoreLinks, deleteSavedWorkerUser, forceKill, getAllPids, getTotalTopologyMemoryReserved, getTotalTopologyMemoryUsed, getTotalWorkersForThisTopology, getWorkerId, getWorkerUser, isProcessAlive, kill, readHeartbeat, readTopoConf, saveWorkerUser, setup, toString, updateMemoryAccounting, writeLogMetadatapublic RunAsUserContainer(Container.ContainerType type, Map<String,Object> conf, String supervisorId, int supervisorPort, int port, LocalAssignment assignment, ResourceIsolationInterface resourceIsolationManager, LocalState localState, String workerId, StormMetricsRegistry metricsRegistry, ContainerMemoryTracker containerMemoryTracker) throws IOException
IOExceptionprotected void kill(long pid)
throws IOException
ContainerKill a given process.
kill in class Containerpid - the id of the process to killIOExceptionprotected void forceKill(long pid)
throws IOException
ContainerKill a given process.
forceKill in class Containerpid - the id of the process to killIOExceptionprotected boolean runProfilingCommand(List<String> command, Map<String,String> env, String logPrefix, File targetDir) throws IOException, InterruptedException
BasicContainerRun the given command for profiling.
runProfilingCommand in class BasicContainercommand - the command to runenv - the environment to run the commandlogPrefix - the prefix to include in the logstargetDir - the working directory to run the command inIOException - on any errorInterruptedException - if interrupted wile waiting for the process to exit.protected void launchWorkerProcess(List<String> command, Map<String,String> env, String logPrefix, ExitCodeCallback processExitCallback, File targetDir) throws IOException
BasicContainerLaunch the worker process (non-blocking).
launchWorkerProcess in class BasicContainercommand - the command to runenv - the environment to run the commandlogPrefix - the prefix to include in the logsprocessExitCallback - a callback for when the process exitstargetDir - the working directory to run the command inIOException - on any errorprotected String getRunWorkerAsUser()
If ‘supervisor.run.worker.as.user’ is set, worker will be launched as the user that launched the topology.
getRunWorkerAsUser in class ContainerCopyright © 2020 The Apache Software Foundation. All rights reserved.