asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Westmann (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: stop application entry point
Date Wed, 20 Apr 2016 04:18:30 GMT
Till Westmann has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/827

Change subject: stop application entry point
......................................................................

stop application entry point

Change-Id: Ia4a8fab765f4878b30b6f7adb430f01ef2757605
---
M hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
1 file changed, 15 insertions(+), 4 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/27/827/1

diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
index e8b2c27..5b5de31 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
@@ -245,10 +245,7 @@
         datasetDirectoryService.init(executor);
         workQueue.start();
         LOGGER.log(Level.INFO, "Started ClusterControllerService");
-        if (aep != null) {
-            // Sometimes, there is no application entry point. Check hyracks-client project
-            aep.startupCompleted();
-        }
+        notifyApplication();
     }
 
     private void startApplication() throws Exception {
@@ -265,9 +262,17 @@
         executor = Executors.newCachedThreadPool(appCtx.getThreadFactory());
     }
 
+    private void notifyApplication() throws Exception {
+        if (aep != null) {
+            // Sometimes, there is no application entry point. Check hyracks-client project
+            aep.startupCompleted();
+        }
+    }
+
     @Override
     public void stop() throws Exception {
         LOGGER.log(Level.INFO, "Stopping ClusterControllerService");
+        stopApplication();
         webServer.stop();
         sweeper.cancel();
         workQueue.stop();
@@ -278,6 +283,12 @@
         LOGGER.log(Level.INFO, "Stopped ClusterControllerService");
     }
 
+    private void stopApplication() throws Exception {
+        if (aep != null) {
+            aep.stop();
+        }
+    }
+
     public ServerContext getServerContext() {
         return serverCtx;
     }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/827
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4a8fab765f4878b30b6f7adb430f01ef2757605
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <tillw@apache.org>

Mime
View raw message