Search in sources :

Example 1 with WebServer

use of org.apache.hyracks.control.cc.web.WebServer in project asterixdb by apache.

the class ClusterControllerService method start.

@Override
public void start() throws Exception {
    LOGGER.log(Level.INFO, "Starting ClusterControllerService: " + this);
    serverCtx = new ServerContext(ServerContext.ServerType.CLUSTER_CONTROLLER, new File(ccConfig.getRootDir()));
    IIPCI ccIPCI = new ClusterControllerIPCI(this);
    clusterIPC = new IPCSystem(new InetSocketAddress(ccConfig.getClusterListenPort()), ccIPCI, new CCNCFunctions.SerializerDeserializer());
    IIPCI ciIPCI = new ClientInterfaceIPCI(this);
    clientIPC = new IPCSystem(new InetSocketAddress(ccConfig.getClientListenAddress(), ccConfig.getClientListenPort()), ciIPCI, new JavaSerializationBasedPayloadSerializerDeserializer());
    webServer = new WebServer(this, ccConfig.getConsoleListenPort());
    clusterIPC.start();
    clientIPC.start();
    webServer.start();
    info = new ClusterControllerInfo(ccConfig.getClientListenAddress(), ccConfig.getClientListenPort(), webServer.getListeningPort());
    timer.schedule(sweeper, 0, ccConfig.getHeartbeatPeriod());
    jobLog.open();
    startApplication();
    datasetDirectoryService.init(executor);
    workQueue.start();
    connectNCs();
    LOGGER.log(Level.INFO, "Started ClusterControllerService");
    notifyApplication();
}
Also used : IIPCI(org.apache.hyracks.ipc.api.IIPCI) ClusterControllerInfo(org.apache.hyracks.api.client.ClusterControllerInfo) JavaSerializationBasedPayloadSerializerDeserializer(org.apache.hyracks.ipc.impl.JavaSerializationBasedPayloadSerializerDeserializer) ServerContext(org.apache.hyracks.control.common.context.ServerContext) WebServer(org.apache.hyracks.control.cc.web.WebServer) InetSocketAddress(java.net.InetSocketAddress) JavaSerializationBasedPayloadSerializerDeserializer(org.apache.hyracks.ipc.impl.JavaSerializationBasedPayloadSerializerDeserializer) LogFile(org.apache.hyracks.control.common.logs.LogFile) File(java.io.File) IPCSystem(org.apache.hyracks.ipc.impl.IPCSystem)

Aggregations

File (java.io.File)1 InetSocketAddress (java.net.InetSocketAddress)1 ClusterControllerInfo (org.apache.hyracks.api.client.ClusterControllerInfo)1 WebServer (org.apache.hyracks.control.cc.web.WebServer)1 ServerContext (org.apache.hyracks.control.common.context.ServerContext)1 LogFile (org.apache.hyracks.control.common.logs.LogFile)1 IIPCI (org.apache.hyracks.ipc.api.IIPCI)1 IPCSystem (org.apache.hyracks.ipc.impl.IPCSystem)1 JavaSerializationBasedPayloadSerializerDeserializer (org.apache.hyracks.ipc.impl.JavaSerializationBasedPayloadSerializerDeserializer)1