use of org.apache.storm.daemon.Shutdownable in project storm by apache.
the class ProcessSimulator method killProcess.
/**
* Kill a process
*
* @param pid
*/
public static void killProcess(String pid) {
synchronized (lock) {
LOG.info("Begin killing process " + pid);
Shutdownable shutdownHandle = processMap.get(pid);
if (shutdownHandle != null) {
shutdownHandle.shutdown();
}
processMap.remove(pid);
LOG.info("Successfully killed process " + pid);
}
}
Aggregations