Murtadha Hubail has submitted this change and it was merged. ( 
https://asterix-gerrit.ics.uci.edu/3416 )

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: Icd2a048a6152105c831183db2440e9dc5b3a1eb5
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3416
Tested-by: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Michael Blow <[email protected]>
Contrib: Michael Blow <[email protected]>
---
M 
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
1 file changed, 11 insertions(+), 4 deletions(-)

Approvals:
  Jenkins: Verified; Verified
  Michael Blow: Looks good to me, approved;

Objections:
  Jenkins: Violations found



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 b5dacfb..91397a8 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
@@ -211,10 +211,9 @@
         clientIPC =
                 new IPCSystem(new 
InetSocketAddress(ccConfig.getClientListenAddress(), 
ccConfig.getClientListenPort()),
                         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());
@@ -226,6 +225,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 {
@@ -317,7 +321,7 @@
     public void stop() throws Exception {
         LOGGER.log(Level.INFO, "Stopping ClusterControllerService");
         stopApplication();
-        webServer.stop();
+        stopWebServers();
         sweeper.cancel();
         workQueue.stop();
         executor.shutdownNow();
@@ -327,8 +331,11 @@
         LOGGER.log(Level.INFO, "Stopped ClusterControllerService");
     }

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

+    private void stopApplication() throws Exception {
         application.stop();
     }


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

Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-MessageType: merged
Gerrit-Change-Id: Icd2a048a6152105c831183db2440e9dc5b3a1eb5
Gerrit-Change-Number: 3416
Gerrit-PatchSet: 2
Gerrit-Owner: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>

Reply via email to