提交 008060f1 编写于 作者: R Robert Metzger

[hotfix] Register signal handler for JobManager and TaskManager

This closes #1400
上级 aad99f25
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册