private void signalProcess(String processId, String user,
String containerIdStr) throws IOException {
if (LOG.isDebugEnabled()) {
LOG.debug("Sending signal to pid " + processId + " as user " + user
+ " for container " + containerIdStr);
}
final ContainerExecutor.Signal signal =
sleepDelayBeforeSigKill > 0 ? ContainerExecutor.Signal.TERM :
ContainerExecutor.Signal.KILL;
boolean result = sendSignal(user, processId, signal);
if (LOG.isDebugEnabled()) {
LOG.debug("Sent signal " + signal + " to pid " + processId + " as user "
+ user + " for container " + containerIdStr + ", result="
+ (result ? "success" : "failed"));
}
if (sleepDelayBeforeSigKill > 0) {
new ContainerExecutor.DelayedProcessKiller(container, user, processId,
sleepDelayBeforeSigKill, ContainerExecutor.Signal.KILL, exec).start();
}
}