Murtadha Hubail has uploaded this change for review. (
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
---
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(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/16/3416/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 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: newchange
Gerrit-Change-Id: Icd2a048a6152105c831183db2440e9dc5b3a1eb5
Gerrit-Change-Number: 3416
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail <[email protected]>