This is an automated email from the ASF dual-hosted git repository. mblow pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 79b24334d5a8528f94e2bc5fd6448c45e628c3c5 Author: Murtadha Hubail <[email protected]> AuthorDate: Thu May 30 05:57:21 2019 +0300 [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]> --- .../hyracks/control/cc/ClusterControllerService.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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 @@ public class ClusterControllerService implements IControllerService { 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()); @@ -228,6 +227,11 @@ public class ClusterControllerService implements IControllerService { notifyApplication(); } + protected void startWebServers() throws Exception { + webServer = new WebServer(this, ccConfig.getConsoleListenPort()); + webServer.start(); + } + private void startApplication() throws Exception { serviceCtx = new CCServiceContext(this, serverCtx, ccContext, ccConfig.getAppConfig()); serviceCtx.addJobLifecycleListener(resultDirectoryService); @@ -317,7 +321,7 @@ public class ClusterControllerService implements IControllerService { 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 @@ public class ClusterControllerService implements IControllerService { 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(); }
