You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by am...@apache.org on 2016/10/31 16:11:25 UTC
asterixdb git commit: Move Shutdown Hook to NCDriver
Repository: asterixdb
Updated Branches:
refs/heads/master 9fbff0185 -> 97f4eaa45
Move Shutdown Hook to NCDriver
Change-Id: Iaef38818e195453eba120a46b5fa7d38b166fd70
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1326
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <bu...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/97f4eaa4
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/97f4eaa4
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/97f4eaa4
Branch: refs/heads/master
Commit: 97f4eaa45061cc45a37d8e1f60afd4f9306a2856
Parents: 9fbff01
Author: Abdullah Alamoudi <ba...@gmail.com>
Authored: Sun Oct 30 10:10:43 2016 -0700
Committer: abdullah alamoudi <ba...@gmail.com>
Committed: Mon Oct 31 09:10:45 2016 -0700
----------------------------------------------------------------------
.../main/java/org/apache/hyracks/control/nc/NCDriver.java | 9 +++++----
.../apache/hyracks/control/nc/NodeControllerService.java | 3 ---
2 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/97f4eaa4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCDriver.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCDriver.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCDriver.java
index cbd8edd..2323d71 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCDriver.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCDriver.java
@@ -39,12 +39,13 @@ public class NCDriver {
System.exit(1);
}
ncConfig.loadConfigAndApplyDefaults();
- final NodeControllerService nService = new NodeControllerService(ncConfig);
+ final NodeControllerService ncService = new NodeControllerService(ncConfig);
if (LOGGER.isLoggable(Level.SEVERE)) {
- LOGGER.severe("Setting uncaught exception handler " + nService.getLifeCycleComponentManager());
+ LOGGER.severe("Setting uncaught exception handler " + ncService.getLifeCycleComponentManager());
}
- Thread.currentThread().setUncaughtExceptionHandler(nService.getLifeCycleComponentManager());
- nService.start();
+ Thread.currentThread().setUncaughtExceptionHandler(ncService.getLifeCycleComponentManager());
+ ncService.start();
+ Runtime.getRuntime().addShutdownHook(new NCShutdownHook(ncService));
while (true) {
Thread.sleep(10000);
}
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/97f4eaa4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java
index 39a2554..21bf9c2 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java
@@ -324,9 +324,6 @@ public class NodeControllerService implements IControllerService {
if (ncAppEntryPoint != null) {
ncAppEntryPoint.notifyStartupComplete();
}
-
- //add JVM shutdown hook
- Runtime.getRuntime().addShutdownHook(new NCShutdownHook(this));
}
private void startApplication() throws Exception {