Murtadha Hubail has uploaded this change for review. ( 
https://asterix-gerrit.ics.uci.edu/3417


Change subject: [NO ISSUE][OTH] Make ClusterControllerService Extensible
......................................................................

[NO ISSUE][OTH] Make ClusterControllerService Extensible

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Allow configuring the web servers started on hyracks
  ClusterControllerService.

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



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/17/3417/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 de1b18d..3f6cb32 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
@@ -220,10 +220,9 @@
                 new IPCSystem(new 
InetSocketAddress(ccConfig.getClientListenAddress(), 
ccConfig.getClientListenPort()),
                         networkSecurityManager.getSocketChannelFactory(), 
ciIPCI,
                         new 
JavaSerializationBasedPayloadSerializerDeserializer());
-        webServer = new WebServer(this, ccConfig.getConsoleListenPort());
         clusterIPC.start();
         clientIPC.start();
-        webServer.start();
+        startWebServers();
         info = new ClusterControllerInfo(ccId, 
ccConfig.getClientPublicAddress(), ccConfig.getClientPublicPort(),
                 ccConfig.getConsolePublicPort());
         timer.schedule(sweeper, 0, ccConfig.getDeadNodeSweepThreshold());
@@ -235,6 +234,11 @@
         connectNCs();
         LOGGER.log(Level.INFO, "Started ClusterControllerService");
         notifyApplication();
+    }
+
+    protected void startWebServers() throws Exception {
+        webServer = new WebServer(this, ccConfig.getConsoleListenPort());
+        webServer.start();
     }

     private void startApplication() throws Exception {
@@ -326,7 +330,7 @@
     public void stop() throws Exception {
         LOGGER.log(Level.INFO, "Stopping ClusterControllerService");
         stopApplication();
-        webServer.stop();
+        stopWebServers();
         sweeper.cancel();
         workQueue.stop();
         executor.shutdownNow();
@@ -336,6 +340,10 @@
         LOGGER.log(Level.INFO, "Stopped ClusterControllerService");
     }

+    protected void stopWebServers() throws Exception {
+        webServer.stop();
+    }
+
     private void stopApplication() throws Exception {

         application.stop();

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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I87ec46a29b2421d88df15494fe6331a0ae5d37f4
Gerrit-Change-Number: 3417
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail <[email protected]>

Reply via email to