[hotfix] Register signal handler for JobManager and TaskManager

This closes #1400
pull/1354/merge
Robert Metzger 9 years ago
parent aad99f25cd
commit 008060f16d

@ -203,6 +203,8 @@ public final class BlobCache implements BlobService {
@Override
public void shutdown() {
if (shutdownRequested.compareAndSet(false, true)) {
LOG.info("Shutting down BlobCache");
// Clean up the storage directory
try {
FileUtils.deleteDirectory(storageDir);

@ -46,6 +46,7 @@ public class SignalHandler {
@Override
public void handle(Signal signal) {
LOG.error("RECEIVED SIGNAL " + signal.getNumber() + ": SIG" + signal.getName());
LOG.error("This JVM will shut down because it was killed from the outside.");
prevHandler.handle(signal);
}
}

@ -1382,6 +1382,7 @@ object JobManager {
// startup checks and logging
EnvironmentInformation.logEnvironmentInfo(LOG.logger, "JobManager", args)
EnvironmentInformation.checkJavaVersion()
SignalHandler.register(LOG.logger)
// parsing the command line arguments
val (configuration: Configuration,

@ -64,7 +64,7 @@ import org.apache.flink.util.NetUtils
import org.apache.flink.runtime.process.ProcessReaper
import org.apache.flink.runtime.security.SecurityUtils
import org.apache.flink.runtime.security.SecurityUtils.FlinkSecuredRunner
import org.apache.flink.runtime.util.{LeaderRetrievalUtils, MathUtils, EnvironmentInformation}
import org.apache.flink.runtime.util.{SignalHandler, LeaderRetrievalUtils, MathUtils, EnvironmentInformation}
import scala.concurrent._
import scala.concurrent.duration._
@ -1204,6 +1204,7 @@ object TaskManager {
// startup checks and logging
EnvironmentInformation.logEnvironmentInfo(LOG.logger, "TaskManager", args)
EnvironmentInformation.checkJavaVersion()
SignalHandler.register(LOG.logger)
val maxOpenFileHandles = EnvironmentInformation.getOpenFileHandlesLimit()
if (maxOpenFileHandles != -1) {

Loading…
Cancel
Save