public class RunAsUserContainer extends BasicContainer
Container.ContainerType_exitedEarly, _localState, _profileCmd, _stormHome_assignment, _conf, _ops, _port, _supervisorId, _symlinksDisabled, _topoConf, _topologyId, _type, _workerId| Constructor and Description |
|---|
RunAsUserContainer(Container.ContainerType type,
Map<String,Object> conf,
String supervisorId,
int port,
LocalAssignment assignment,
LocalState localState,
String workerId) |
| 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, getWildcardDir, getWorkerClassPath, javaCmd, javaLibraryPath, launch, relaunch, runProfiling, substituteChildopts, substituteChildoptsareAllProcessesDead, cleanUp, createArtifactsLink, createBlobstoreLinks, deleteSavedWorkerUser, forceKill, getAllPids, getWorkerId, getWorkerUser, isProcessAlive, kill, readHeartbeat, readTopoConf, saveWorkerUser, setup, toString, writeLogMetadatapublic RunAsUserContainer(Container.ContainerType type, Map<String,Object> conf, String supervisorId, int port, LocalAssignment assignment, LocalState localState, String workerId) 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 logstargetDir - 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 © 2019 The Apache Software Foundation. All Rights Reserved.