Merged -r 1390:1391 from asterix_stabilization. Removed CCBootstrapImpl that should have been deleted by a previous merge. Changed dependency on hyracks-client to version 0.2.4-SNAPSHOT
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_result_distribution@1392 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/pom.xml b/asterix-app/pom.xml
index ac63075..5c0a1a6 100644
--- a/asterix-app/pom.xml
+++ b/asterix-app/pom.xml
@@ -142,7 +142,6 @@
<dependency>
<groupId>edu.uci.ics.hyracks</groupId>
<artifactId>hyracks-client</artifactId>
- <version>0.2.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>edu.uci.ics.asterix</groupId>
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCBootstrapImpl.java b/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCBootstrapImpl.java
deleted file mode 100644
index 3e9a6ea..0000000
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCBootstrapImpl.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright 2009-2011 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.asterix.hyracks.bootstrap;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-import org.eclipse.jetty.servlet.ServletHolder;
-
-import edu.uci.ics.asterix.api.http.servlet.APIServlet;
-import edu.uci.ics.asterix.api.http.servlet.DDLAPIServlet;
-import edu.uci.ics.asterix.api.http.servlet.QueryAPIServlet;
-import edu.uci.ics.asterix.api.http.servlet.QueryResultAPIServlet;
-import edu.uci.ics.asterix.api.http.servlet.QueryStatusAPIServlet;
-import edu.uci.ics.asterix.api.http.servlet.UpdateAPIServlet;
-import edu.uci.ics.asterix.common.api.AsterixAppContextInfoImpl;
-import edu.uci.ics.asterix.common.config.GlobalConfig;
-import edu.uci.ics.asterix.metadata.MetadataManager;
-import edu.uci.ics.asterix.metadata.api.IAsterixStateProxy;
-import edu.uci.ics.asterix.metadata.bootstrap.AsterixProperties;
-import edu.uci.ics.asterix.metadata.bootstrap.AsterixStateProxy;
-import edu.uci.ics.hyracks.api.application.ICCApplicationContext;
-
-/**
- * The bootstrap class of the application that will manage its life cycle at the
- * Cluster Controller.
- */
-public class CCBootstrapImpl implements ICCBootstrap {
- private static final Logger LOGGER = Logger.getLogger(CCBootstrapImpl.class.getName());
-
- private static final int DEFAULT_WEB_SERVER_PORT = 19001;
-
- private static final int DEFAULT_JSON_API_SERVER_PORT = 19101;
-
- private Server webServer;
- private Server jsonAPIServer;
- private static IAsterixStateProxy proxy;
- private ICCApplicationContext appCtx;
-
- @Override
- public void start() throws Exception {
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.info("Starting Asterix cluster controller");
- }
-
- proxy = AsterixStateProxy.registerRemoteObject();
- proxy.setAsterixProperties(AsterixProperties.INSTANCE);
- appCtx.setDistributedState(proxy);
-
- MetadataManager.INSTANCE = new MetadataManager(proxy);
-
- setupWebServer();
- webServer.start();
-
- // Setup and start the web interface
- setupJSONAPIServer();
- jsonAPIServer.start();
-
- AsterixAppContextInfoImpl.initialize(appCtx);
- }
-
- @Override
- public void stop() throws Exception {
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.info("Stopping Asterix cluster controller");
- }
- AsterixStateProxy.unregisterRemoteObject();
-
- webServer.stop();
- }
-
- @Override
- public void setApplicationContext(ICCApplicationContext appCtx) {
- this.appCtx = appCtx;
- }
-
- private void setupWebServer() throws Exception {
- String portStr = System.getProperty(GlobalConfig.WEB_SERVER_PORT_PROPERTY);
- int port = DEFAULT_WEB_SERVER_PORT;
- if (portStr != null) {
- port = Integer.parseInt(portStr);
- }
- webServer = new Server(port);
-
- ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
- context.setContextPath("/");
- webServer.setHandler(context);
- context.addServlet(new ServletHolder(new APIServlet()), "/*");
- }
-
- private void setupJSONAPIServer() throws Exception {
- String portStr = System.getProperty(GlobalConfig.JSON_API_SERVER_PORT_PROPERTY);
- int port = DEFAULT_JSON_API_SERVER_PORT;
- if (portStr != null) {
- port = Integer.parseInt(portStr);
- }
- jsonAPIServer = new Server(port);
-
- ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
- context.setContextPath("/");
- jsonAPIServer.setHandler(context);
- context.addServlet(new ServletHolder(new QueryAPIServlet()), "/query");
- context.addServlet(new ServletHolder(new QueryStatusAPIServlet()), "/query/status");
- context.addServlet(new ServletHolder(new QueryResultAPIServlet()), "/query/result");
- context.addServlet(new ServletHolder(new UpdateAPIServlet()), "/update");
- context.addServlet(new ServletHolder(new DDLAPIServlet()), "/ddl");
- }
-}
diff --git a/pom.xml b/pom.xml
index b82b253..a8e7220 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,8 +7,8 @@
<packaging>pom</packaging>
<properties>
- <algebricks.version>0.2.3-SNAPSHOT</algebricks.version>
- <hyracks.version>0.2.3-SNAPSHOT</hyracks.version>
+ <algebricks.version>0.2.4-SNAPSHOT</algebricks.version>
+ <hyracks.version>0.2.4-SNAPSHOT</hyracks.version>
</properties>
<build>
@@ -204,6 +204,11 @@
<artifactId>hyracks-storage-am-common</artifactId>
<version>${hyracks.version}</version>
</dependency>
+ <dependency>
+ <groupId>edu.uci.ics.hyracks</groupId>
+ <artifactId>hyracks-client</artifactId>
+ <version>${hyracks.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
</project>