1) Replaced asterix-dist with asterix-installer.
2) Added required module: asterix-events.
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_ioc_installer@1259 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java
index 1eb37cd..c628a7f 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java
@@ -370,7 +370,7 @@
DisplayFormat pdf) throws Exception {
for (int i = 0; i < specs.length; i++) {
specs[i].setMaxReattempts(0);
- JobId jobId = hcc.startJob(GlobalConfig.HYRACKS_APP_NAME, specs[i]);
+ JobId jobId = hcc.startJob(specs[i]);
long startTime = System.currentTimeMillis();
hcc.waitForCompletion(jobId);
long endTime = System.currentTimeMillis();
@@ -386,7 +386,7 @@
jobs[i].getJobSpec().setMaxReattempts(0);
long startTime = System.currentTimeMillis();
try {
- JobId jobId = hcc.startJob(GlobalConfig.HYRACKS_APP_NAME, jobs[i].getJobSpec());
+ JobId jobId = hcc.startJob(jobs[i].getJobSpec());
if (jobs[i].getSubmissionMode() == SubmissionMode.ASYNCHRONOUS) {
continue;
}
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java
index 3c43736..6b2fd77 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java
@@ -3,6 +3,8 @@
import java.util.EnumSet;
import edu.uci.ics.asterix.common.config.GlobalConfig;
+import edu.uci.ics.asterix.hyracks.bootstrap.CCApplicationEntryPoint;
+import edu.uci.ics.asterix.hyracks.bootstrap.NCApplicationEntryPoint;
import edu.uci.ics.hyracks.api.client.HyracksConnection;
import edu.uci.ics.hyracks.api.client.IHyracksClientConnection;
import edu.uci.ics.hyracks.api.job.JobFlag;
@@ -35,6 +37,7 @@
ccConfig.clientNetPort = DEFAULT_HYRACKS_CC_CLIENT_PORT;
ccConfig.clusterNetPort = DEFAULT_HYRACKS_CC_CLUSTER_PORT;
ccConfig.defaultMaxJobAttempts = 0;
+ ccConfig.appCCMainClass = CCApplicationEntryPoint.class.getName();
// ccConfig.useJOL = true;
cc = new ClusterControllerService(ccConfig);
cc.start();
@@ -45,6 +48,7 @@
ncConfig1.clusterNetIPAddress = "127.0.0.1";
ncConfig1.dataIPAddress = "127.0.0.1";
ncConfig1.nodeId = NC1_ID;
+ ncConfig1.appNCMainClass = NCApplicationEntryPoint.class.getName();
nc1 = new NodeControllerService(ncConfig1);
nc1.start();
@@ -54,26 +58,17 @@
ncConfig2.clusterNetIPAddress = "127.0.0.1";
ncConfig2.dataIPAddress = "127.0.0.1";
ncConfig2.nodeId = NC2_ID;
+ ncConfig2.appNCMainClass = NCApplicationEntryPoint.class.getName();
nc2 = new NodeControllerService(ncConfig2);
nc2.start();
hcc = new HyracksConnection(cc.getConfig().clientNetIpAddress, cc.getConfig().clientNetPort);
- hcc.createApplication(GlobalConfig.HYRACKS_APP_NAME, null);
-
}
public static IHyracksClientConnection getHyracksClientConnection() {
return hcc;
}
- public static void destroyApp() throws Exception {
- hcc.destroyApplication(GlobalConfig.HYRACKS_APP_NAME);
- }
-
- public static void createApp() throws Exception {
- hcc.createApplication(GlobalConfig.HYRACKS_APP_NAME, null);
- }
-
public static void deinit() throws Exception {
nc2.stop();
nc1.stop();
@@ -82,7 +77,7 @@
public static void runJob(JobSpecification spec) throws Exception {
GlobalConfig.ASTERIX_LOGGER.info(spec.toJSON().toString());
- JobId jobId = hcc.startJob(GlobalConfig.HYRACKS_APP_NAME, spec, EnumSet.of(JobFlag.PROFILE_RUNTIME));
+ JobId jobId = hcc.startJob(spec, EnumSet.of(JobFlag.PROFILE_RUNTIME));
GlobalConfig.ASTERIX_LOGGER.info(jobId.toString());
hcc.waitForCompletion(jobId);
}
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java b/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
index 66239e2..d42d135 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
@@ -836,7 +836,7 @@
for (int i = 0; i < jobs.length; i++) {
JobSpecification spec = jobs[i].getJobSpec();
spec.setMaxReattempts(0);
- JobId jobId = hcc.startJob(GlobalConfig.HYRACKS_APP_NAME, spec);
+ JobId jobId = hcc.startJob(spec);
hcc.waitForCompletion(jobId);
}
}
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/file/DatasetOperations.java b/asterix-app/src/main/java/edu/uci/ics/asterix/file/DatasetOperations.java
index 5d3ab0a..075ddd3 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/file/DatasetOperations.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/file/DatasetOperations.java
@@ -174,6 +174,17 @@
throw new AsterixException("Could not find dataset " + datasetName + " in datavetse " + dataverseName);
}
ARecordType itemType = (ARecordType) metadata.findType(dataverseName, dataset.getItemTypeName());
+ for (String keyField : DatasetUtils.getPartitioningKeys(dataset)) {
+ try {
+ if (!itemType.isClosedField(keyField)) {
+ throw new AsterixException("Cannot partition dataset \"" + dataset.getDatasetName()
+ + "\" by key \"" + keyField + "\" since it is not a valid field of \""
+ + itemType.getTypeName() + "\"");
+ }
+ } catch (IOException e) {
+ throw new AsterixException(e);
+ }
+ }
JobSpecification spec = new JobSpecification();
IBinaryComparatorFactory[] comparatorFactories = DatasetUtils.computeKeysBinaryComparatorFactories(dataset,
itemType, format.getBinaryComparatorFactoryProvider());
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestKeywordIndexJob.java b/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestKeywordIndexJob.java
index c295f55..6baa865 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestKeywordIndexJob.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestKeywordIndexJob.java
@@ -220,7 +220,7 @@
JobSpecification jobSpec = tij.createJobSpec();
long start = System.currentTimeMillis();
- JobId jobId = hcc.startJob("asterix", jobSpec);
+ JobId jobId = hcc.startJob(jobSpec);
hcc.waitForCompletion(jobId);
long end = System.currentTimeMillis();
System.err.println(start + " " + end + " " + (end - start));
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestSecondaryIndexJob.java b/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestSecondaryIndexJob.java
index 5d2cdc5..3faca96 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestSecondaryIndexJob.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestSecondaryIndexJob.java
@@ -220,7 +220,7 @@
JobSpecification jobSpec = tij.createJobSpec();
long start = System.currentTimeMillis();
- JobId jobId = hcc.startJob("asterix", jobSpec);
+ JobId jobId = hcc.startJob(jobSpec);
hcc.waitForCompletion(jobId);
long end = System.currentTimeMillis();
System.err.println(start + " " + end + " " + (end - start));
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/CCApplicationEntryPoint.java
similarity index 66%
rename from asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCBootstrapImpl.java
rename to asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
index 9b29427..e755bc8 100644
--- 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/CCApplicationEntryPoint.java
@@ -1,17 +1,3 @@
-/*
- * 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;
@@ -29,14 +15,10 @@
import edu.uci.ics.asterix.metadata.bootstrap.AsterixProperties;
import edu.uci.ics.asterix.metadata.bootstrap.AsterixStateProxy;
import edu.uci.ics.hyracks.api.application.ICCApplicationContext;
-import edu.uci.ics.hyracks.api.application.ICCBootstrap;
+import edu.uci.ics.hyracks.api.application.ICCApplicationEntryPoint;
-/**
- * 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());
+public class CCApplicationEntryPoint implements ICCApplicationEntryPoint {
+ private static final Logger LOGGER = Logger.getLogger(CCApplicationEntryPoint.class.getName());
private static final int DEFAULT_WEB_SERVER_PORT = 19001;
@@ -45,7 +27,8 @@
private ICCApplicationContext appCtx;
@Override
- public void start() throws Exception {
+ public void start(ICCApplicationContext ccAppCtx, String[] args) throws Exception {
+ this.appCtx = ccAppCtx;
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.info("Starting Asterix cluster controller");
}
@@ -72,11 +55,6 @@
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;
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCBootstrapImpl.java b/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCApplicationEntryPoint.java
similarity index 71%
rename from asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCBootstrapImpl.java
rename to asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCApplicationEntryPoint.java
index 185c608..a8bd499 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCBootstrapImpl.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCApplicationEntryPoint.java
@@ -1,17 +1,3 @@
-/*
- * 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.rmi.RemoteException;
@@ -26,10 +12,10 @@
import edu.uci.ics.asterix.metadata.api.IMetadataNode;
import edu.uci.ics.asterix.metadata.bootstrap.MetadataBootstrap;
import edu.uci.ics.hyracks.api.application.INCApplicationContext;
-import edu.uci.ics.hyracks.api.application.INCBootstrap;
+import edu.uci.ics.hyracks.api.application.INCApplicationEntryPoint;
-public class NCBootstrapImpl implements INCBootstrap {
- private static final Logger LOGGER = Logger.getLogger(NCBootstrapImpl.class.getName());
+public class NCApplicationEntryPoint implements INCApplicationEntryPoint {
+ private static final Logger LOGGER = Logger.getLogger(NCApplicationEntryPoint.class.getName());
private INCApplicationContext ncApplicationContext = null;
private AsterixAppRuntimeContext runtimeContext;
@@ -37,7 +23,8 @@
private boolean isMetadataNode = false;
@Override
- public void start() throws Exception {
+ public void start(INCApplicationContext ncAppCtx, String[] args) throws Exception {
+ ncApplicationContext = ncAppCtx;
nodeId = ncApplicationContext.getNodeId();
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.info("Starting Asterix node controller: " + nodeId);
@@ -47,30 +34,6 @@
runtimeContext.initialize();
ncApplicationContext.setApplicationObject(runtimeContext);
- IAsterixStateProxy proxy = (IAsterixStateProxy) ncApplicationContext.getDistributedState();
- isMetadataNode = nodeId.equals(proxy.getAsterixProperties().getMetadataNodeName());
- if (isMetadataNode) {
- registerRemoteMetadataNode(proxy);
-
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.info("Bootstrapping metadata");
- }
- MetadataManager.INSTANCE = new MetadataManager(proxy);
- MetadataManager.INSTANCE.init();
- MetadataBootstrap.startUniverse(proxy.getAsterixProperties(), ncApplicationContext);
- }
-
- }
-
- public void registerRemoteMetadataNode(IAsterixStateProxy proxy) throws RemoteException {
- IMetadataNode stub = null;
- MetadataNode.INSTANCE.initialize(runtimeContext);
- stub = (IMetadataNode) UnicastRemoteObject.exportObject(MetadataNode.INSTANCE, 0);
- proxy.setMetadataNode(stub);
-
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.info("Metadata node bound");
- }
}
@Override
@@ -86,7 +49,29 @@
}
@Override
- public void setApplicationContext(INCApplicationContext appCtx) {
- this.ncApplicationContext = appCtx;
+ public void notifyStartupComplete() throws Exception {
+ IAsterixStateProxy proxy = (IAsterixStateProxy) ncApplicationContext.getDistributedState();
+ isMetadataNode = nodeId.equals(proxy.getAsterixProperties().getMetadataNodeName());
+ if (isMetadataNode) {
+ registerRemoteMetadataNode(proxy);
+
+ if (LOGGER.isLoggable(Level.INFO)) {
+ LOGGER.info("Bootstrapping metadata");
+ }
+ MetadataManager.INSTANCE = new MetadataManager(proxy);
+ MetadataManager.INSTANCE.init();
+ MetadataBootstrap.startUniverse(proxy.getAsterixProperties(), ncApplicationContext);
+ }
+ }
+
+ public void registerRemoteMetadataNode(IAsterixStateProxy proxy) throws RemoteException {
+ IMetadataNode stub = null;
+ MetadataNode.INSTANCE.initialize(runtimeContext);
+ stub = (IMetadataNode) UnicastRemoteObject.exportObject(MetadataNode.INSTANCE, 0);
+ proxy.setMetadataNode(stub);
+
+ if (LOGGER.isLoggable(Level.INFO)) {
+ LOGGER.info("Metadata node bound");
+ }
}
}
\ No newline at end of file
diff --git a/asterix-app/src/test/java/edu/uci/ics/asterix/test/dml/DmlTest.java b/asterix-app/src/test/java/edu/uci/ics/asterix/test/dml/DmlTest.java
index 5b88edb..d6fda24 100644
--- a/asterix-app/src/test/java/edu/uci/ics/asterix/test/dml/DmlTest.java
+++ b/asterix-app/src/test/java/edu/uci/ics/asterix/test/dml/DmlTest.java
@@ -47,9 +47,6 @@
loadReader.close();
}
asterixLoad.execute();
- AsterixHyracksIntegrationUtil.destroyApp();
-
- AsterixHyracksIntegrationUtil.createApp();
File enlistFile = new File(ENLIST_FILE);
String resultFileName = TestsUtils.aqlExtToResExt(enlistFile.getName());
File expectedFile = new File(PATH_EXPECTED + SEPARATOR + resultFileName);
diff --git a/asterix-app/src/test/resources/runtimets/queries/misc/partition-by-nonexistent-field.aql b/asterix-app/src/test/resources/runtimets/queries/misc/partition-by-nonexistent-field.aql
new file mode 100644
index 0000000..10dbfc1
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/misc/partition-by-nonexistent-field.aql
@@ -0,0 +1,20 @@
+/*
+ * Description : Tries to partition a dataset by a non-existent field
+ * Expected Result: An error reporting that this is not allowed
+ * Author: zheilbron
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TestType as open{
+name1:string
+}
+
+create dataset testds(TestType) primary key id;
+
+insert into dataset testds({"name1":"John","name2":"Smith"});
+
+for $l in dataset('testds')
+return $l
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index de694cd..e8e7d72 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -1963,6 +1963,12 @@
</test-case>
</test-group>
<test-group name="misc">
+ <test-case FilePath="misc">
+ <compilation-unit name="partition-by-nonexistent-field">
+ <output-file compare="Text">partition-by-nonexistent-field.adm</output-file>
+ <expected-error>edu.uci.ics.asterix.common.exceptions.AsterixException</expected-error>
+ </compilation-unit>
+ </test-case>
<test-case FilePath="misc">
<compilation-unit name="float_01">
<output-file compare="Text">float_01.adm</output-file>
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/GlobalConfig.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/GlobalConfig.java
index bb39f90..49e8450 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/GlobalConfig.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/GlobalConfig.java
@@ -25,8 +25,6 @@
public static final int DEFAULT_BUFFER_CACHE_NUM_PAGES = 4096;
- public static final String HYRACKS_APP_NAME = "asterix";
-
public static final int DEFAULT_FRAME_SIZE = 32768;
public static final String FRAME_SIZE_PROPERTY = "FrameSize";
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/AsterixAppRuntimeContext.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/AsterixAppRuntimeContext.java
index c334bbb..f84f294 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/AsterixAppRuntimeContext.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/AsterixAppRuntimeContext.java
@@ -45,7 +45,7 @@
ICacheMemoryAllocator allocator = new HeapBufferAllocator();
IPageReplacementStrategy prs = new ClockPageReplacementStrategy();
IIOManager ioMgr = ncApplicationContext.getRootContext().getIOManager();
- IPageCleanerPolicy pcp = new DelayPageCleanerPolicy(1000);
+ IPageCleanerPolicy pcp = new DelayPageCleanerPolicy(600000);
bufferCache = new BufferCache(ioMgr, allocator, prs, pcp, fileMapManager, pageSize, numPages, Integer.MAX_VALUE);
// Initialize the index registry
diff --git a/asterix-dist/pom.xml b/asterix-dist/pom.xml
deleted file mode 100644
index 654a11e..0000000
--- a/asterix-dist/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>asterix-dist</artifactId>
- <parent>
- <groupId>edu.uci.ics.asterix</groupId>
- <artifactId>asterix</artifactId>
- <version>0.0.4-SNAPSHOT</version>
- </parent>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-5</version>
- <executions>
- <execution>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/binary-assembly.xml</descriptor>
- </descriptors>
- </configuration>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>edu.uci.ics.hyracks</groupId>
- <artifactId>hyracks-server</artifactId>
- <version>0.2.3-SNAPSHOT</version>
- <type>zip</type>
- <classifier>binary-assembly</classifier>
- </dependency>
- <dependency>
- <groupId>edu.uci.ics.hyracks</groupId>
- <artifactId>hyracks-cli</artifactId>
- <version>0.2.3-SNAPSHOT</version>
- <type>zip</type>
- <classifier>binary-assembly</classifier>
- </dependency>
- <dependency>
- <groupId>edu.uci.ics.asterix</groupId>
- <artifactId>asterix-app</artifactId>
- <version>0.0.4-SNAPSHOT</version>
- <type>zip</type>
- <classifier>binary-assembly</classifier>
- </dependency>
- </dependencies>
-</project>
diff --git a/asterix-dist/src/main/assembly/binary-assembly.xml b/asterix-dist/src/main/assembly/binary-assembly.xml
deleted file mode 100644
index ecf6d32..0000000
--- a/asterix-dist/src/main/assembly/binary-assembly.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<assembly>
- <id>binary-assembly</id>
- <formats>
- <format>zip</format>
- <format>dir</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>src/main/scripts</directory>
- <outputDirectory>.</outputDirectory>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <outputDirectory>hyracks-server</outputDirectory>
- <includes>
- <include>hyracks-server*</include>
- </includes>
- <unpack>true</unpack>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- </dependencySet>
- <dependencySet>
- <outputDirectory>hyracks-cli</outputDirectory>
- <includes>
- <include>hyracks-cli*</include>
- </includes>
- <unpack>true</unpack>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- </dependencySet>
- <dependencySet>
- <outputDirectory>asterix</outputDirectory>
- <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
- <includes>
- <include>asterix-app*</include>
- </includes>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- </dependencySet>
- <!--dependencySet>
- <outputDirectory>archives</outputDirectory>
- <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
- <excludes>
- <exclude>asterix-dist*</exclude>
- </excludes>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- </dependencySet-->
- </dependencySets>
-</assembly>
diff --git a/asterix-dist/src/main/scripts/startasterix.sh b/asterix-dist/src/main/scripts/startasterix.sh
deleted file mode 100644
index b84834f..0000000
--- a/asterix-dist/src/main/scripts/startasterix.sh
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/bash
-
-# Logging output for the CC and NCs is directed to their appropriately named
-# files in LOG_HOME
-#
-# Example usage: ./runasterix.sh 4
-# Loads 1 CC, 4 NCs (nc0, nc1, nc2, and nc3)
-#
-
-BASEDIR=`pwd`/$(dirname $0)
-echo "Base dir: " ${BASEDIR}
-
-ASTERIX_BIN=${BASEDIR}/asterix/asterix-app.zip
-HYRACKS_SERVER_BIN=${BASEDIR}/hyracks-server/bin
-HYRACKS_CLI_BIN=${BASEDIR}/hyracks-cli/bin
-
-CONFIG_DIR=${BASEDIR}/config
-LOG_DIR=${BASEDIR}/log
-
-mkdir ${LOG_DIR} ${CONFIG_DIR}
-
-CONFIG_NAME=local-autogen.properties # name of config file to generate
-
-# check existence of directories
-dirs=($HYRACKS_SERVER_BIN $HYRACKS_CLI_BIN $LOG_DIR $CONFIG_DIR)
-for i in "${dirs[@]}"
-do
- if [ ! -d "$i" ]
- then
- printf "Error: invalid directory layout -- can't access $i\n" >&2
- exit 2
- fi
-done
-
-# set number of node controllers to load
-if [ "$1" == "" ]
-then
- numnc=1
-else
- if echo $1 | egrep -q '^[0-9]+$'; then
- numnc=$1
- else
- printf "Error: $1 is not a number.\n" >&2
- printf "usage: %s [number_of_ncs]\n" $(basename $0) >&2
- exit 2
- fi
-fi
-
-# generate a suitable config file
-echo "generating config file..."
-printf "MetadataNode=nc1\nNewUniverse=true\n" > $CONFIG_DIR/$CONFIG_NAME
-for ((i=1;i<=$numnc;i++)); do
- echo "nc$i.stores=/tmp/nc$i/" >> $CONFIG_DIR/$CONFIG_NAME
-done
-echo "OutputDir=/tmp/asterix_output/" >> $CONFIG_DIR/$CONFIG_NAME
-
-# point to the config file and give java some extra memory
-export CLASSPATH_PREFIX=$CONFIG_DIR
-export JAVA_OPTS="-DAsterixConfigFileName=$CONFIG_NAME -Xms256m -Xmx512m"
-
-echo "cluster controller starting..."
-sh $HYRACKS_SERVER_BIN/hyrackscc -cc-root localhost -client-net-ip-address 127.0.0.1 -cluster-net-ip-address 127.0.0.1 &> $LOG_DIR/cc.log &
-
-# for some reason this helps against getting a socket error
-sleep 3
-
-# start the node controllers
-for ((i=1;i<=$numnc;i++)); do
- echo "node controller (nc$i) starting..."
- sh $HYRACKS_SERVER_BIN/hyracksnc -cc-host localhost -cluster-net-ip-address 127.0.0.1 -data-ip-address 127.0.0.1 -node-id "nc$i" \
- &> $LOG_DIR/nc$i.log &
-
- # avoid socket error
- sleep .5
-done
-
-# deploy the asterix application to hyracks
-echo "connect to \"localhost\";create application asterix \"$ASTERIX_BIN\";" > $CONFIG_DIR/deploy.hcli
-cat $CONFIG_DIR/deploy.hcli | sh $HYRACKS_CLI_BIN/hyrackscli
diff --git a/asterix-dist/src/main/scripts/stopasterix.sh b/asterix-dist/src/main/scripts/stopasterix.sh
deleted file mode 100644
index 7b32b85..0000000
--- a/asterix-dist/src/main/scripts/stopasterix.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-# get the PIDs of java processes we started
-if [ "$JAVA_HOME" != "" ]
-then
- PIDS=`$JAVA_HOME/bin/jps`
-else
- PIDS=`jps`
-fi
-
-while IFS='\n' read -ra MYPIDS; do
- for i in "${MYPIDS[@]}"; do
- pid=`echo $i | grep 'CCDriver\|NCDriver\|VirtualClusterDriver' | awk '{print $1}'`
- name=`echo $i | grep 'CCDriver\|NCDriver\|VirtualClusterDriver' | awk '{print $2}'`
- if [ "$pid" != "" ]
- then
- echo "Stopping $name: $pid"
- kill -9 $pid
- fi
- done
-done <<< "$PIDS"
diff --git a/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventTask.java b/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventTask.java
index 9f52642..2586adf 100644
--- a/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventTask.java
+++ b/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventTask.java
@@ -20,8 +20,7 @@
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.apache.log4j.Logger;
import edu.uci.ics.asterix.event.driver.EventDriver;
import edu.uci.ics.asterix.event.schema.cluster.Node;
@@ -54,9 +53,7 @@
private boolean reuseLocation = false;
private State state;
- static {
- logger.setLevel(Level.WARNING);
- }
+
public EventTask(Pattern pattern, EventrixClient client) {
this.pattern = pattern;
@@ -91,7 +88,8 @@
if (location.getId().equals(EventDriver.CLIENT_NODE_ID)) {
scriptsDir = client.getEventsDir() + File.separator + "events";
} else {
- scriptsDir = client.getCluster().getWorkingDir().getDir() + File.separator + "eventrix" + File.separator + "events";
+ scriptsDir = client.getCluster().getWorkingDir().getDir()
+ + File.separator + "eventrix" + File.separator + "events";
}
event = EventUtil.getEvent(pattern, client.getEvents());
taskScript = scriptsDir + File.separator + event.getScript();
@@ -120,7 +118,7 @@
}
}
- logger.info(EventUtil.dateFormat.format(new Date()) + " "
+ logger.debug(EventUtil.dateFormat.format(new Date()) + " "
+ "EVENT " + pattern.getEvent().getType().toUpperCase()
+ " at " + location.getId().toUpperCase());
try {
@@ -136,8 +134,7 @@
}
} catch (IOException ioe) {
timer.cancel();
- client
- .notifyCompletion(new EventTaskReport(this, false, ioe));
+ client.notifyCompletion(new EventTaskReport(this, false, ioe));
}
}
diff --git a/asterix-events/src/main/java/edu/uci/ics/asterix/event/xml/ConfigParser.java b/asterix-events/src/main/java/edu/uci/ics/asterix/event/xml/ConfigParser.java
deleted file mode 100644
index b399226..0000000
--- a/asterix-events/src/main/java/edu/uci/ics/asterix/event/xml/ConfigParser.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2009-2012 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.event.xml;
-
-import java.io.File;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-
-public class ConfigParser {
-
- private static final String JAXB_PKG = "edu.uci.ics.asterix.event.trigger";
-
- public static void main(String [] args){
- try {
- String path = "config/event_pattern1.xml";
- JAXBContext ctx = JAXBContext.newInstance(JAXB_PKG);
- Unmarshaller unmarshaller = ctx.createUnmarshaller();
- Object o = unmarshaller.unmarshal(new File(path));
- } catch (JAXBException e) {
- e.printStackTrace();
- }
-
- }
-}
diff --git a/asterix-events/src/main/resources/events/asterix_deploy/asterix_deploy.sh b/asterix-events/src/main/resources/events/asterix_deploy/asterix_deploy.sh
deleted file mode 100755
index 532e559..0000000
--- a/asterix-events/src/main/resources/events/asterix_deploy/asterix_deploy.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-MANAGIX_HOME=$1
-HYRACKS_CLI=$MANAGIX_HOME/asterix/hyracks-cli/bin/hyrackscli
-if ! [ -x $HYRACKS_CLI ]
-then
- chmod +x $HYRACKS_CLI
-fi
-ASTERIX_ZIP=$2
-HOST=$3
-echo "connect to \"$HOST\";" > temp
-echo "create application asterix \"$ASTERIX_ZIP\";" >> temp
-($HYRACKS_CLI < temp)
diff --git a/asterix-events/src/main/resources/events/cc_failure/cc_failure.sh b/asterix-events/src/main/resources/events/cc_failure/cc_failure.sh
index 0855f5f..aa722e5 100755
--- a/asterix-events/src/main/resources/events/cc_failure/cc_failure.sh
+++ b/asterix-events/src/main/resources/events/cc_failure/cc_failure.sh
@@ -1,6 +1,6 @@
#kill -9 `ps -ef | grep hyracks | grep -v grep | cut -d "/" -f1 | tr -s " " | cut -d " " -f2`
-CC_PARENT_ID_INFO=`ps -ef | grep hyracks | grep cc_start | grep -v ssh`
+CC_PARENT_ID_INFO=`ps -ef | grep asterix | grep cc_start | grep -v ssh`
CC_PARENT_ID=`echo $CC_PARENT_ID_INFO | tr -s " " | cut -d " " -f2`
-CC_ID_INFO=`ps -ef | grep hyracks | grep $CC_PARENT_ID | grep -v bash`
+CC_ID_INFO=`ps -ef | grep asterix | grep $CC_PARENT_ID | grep -v bash`
CC_ID=`echo $CC_ID_INFO | tr -s " " | cut -d " " -f2`
kill -9 $CC_ID
diff --git a/asterix-events/src/main/resources/events/cc_start/cc_start.sh b/asterix-events/src/main/resources/events/cc_start/cc_start.sh
index e0b29e0..37645bc 100755
--- a/asterix-events/src/main/resources/events/cc_start/cc_start.sh
+++ b/asterix-events/src/main/resources/events/cc_start/cc_start.sh
@@ -2,8 +2,4 @@
then
mkdir -p $LOG_DIR
fi
-if [ ! -z $1 ];
-then
- JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=$1,server=y,suspend=n"
-fi
-$HYRACKS_HOME/bin/hyrackscc -client-net-ip-address $CLIENT_NET_IP -client-net-port 1098 -cluster-net-ip-address $CLUSTER_NET_IP -cluster-net-port 1099 -http-port 8888 &> $LOG_DIR/cc.log
+$ASTERIX_HOME/bin/asterixcc -client-net-ip-address $CLIENT_NET_IP -client-net-port 1098 -cluster-net-ip-address $CLUSTER_NET_IP -cluster-net-port 1099 -http-port 8888 &> $LOG_DIR/cc.log
diff --git a/asterix-events/src/main/resources/events/file/transfer.sh b/asterix-events/src/main/resources/events/file/transfer.sh
index 08f0b43..fbd4554 100755
--- a/asterix-events/src/main/resources/events/file/transfer.sh
+++ b/asterix-events/src/main/resources/events/file/transfer.sh
@@ -18,6 +18,7 @@
then
echo "ssh -l $USERNAME $DEST_HOST unzip -o -q -d $DEST_DIR $DEST_DIR/$filename"
ssh -l $USERNAME $DEST_HOST "unzip -o -q -d $DEST_DIR $DEST_DIR/$filename"
+ ssh -l $USERNAME $DEST_HOST "chmod -R 755 $DEST_DIR"
fi
fi
fi
diff --git a/asterix-events/src/main/resources/events/node_failure/nc_failure.sh b/asterix-events/src/main/resources/events/node_failure/nc_failure.sh
index b853be1..fc4a0be 100755
--- a/asterix-events/src/main/resources/events/node_failure/nc_failure.sh
+++ b/asterix-events/src/main/resources/events/node_failure/nc_failure.sh
@@ -1,19 +1,7 @@
NC_ID=$1
-#if [ $NC_ID == 'ANY' ]
-#then
-# NC_ID="."
-#fi
-#
-#USER=`who am i | tr -s " " | cut -d " " -f1`
-#PARENT_ID=`ps -ef | tr -s " " | grep nc_join | grep -v grep | grep -v ssh | grep $NC_ID | cut -d " " -f2 | head -n 1`
-#PID=`ps -ef | tr -s " " | grep hyracks | grep -v grep | grep -v nc_join | grep $PARENT_ID | cut -d " " -f2 | head -n 1`
-#kill -9 $PID
-#
-
-
INFO=`ps -ef | grep nc_join | grep -v grep | grep -v ssh| grep $NC_ID | head -n 1`
PARENT_ID=`echo $INFO | cut -d " " -f2`
-PID_INFO=`ps -ef | grep hyracks | grep -v grep | grep -v nc_join | grep $PARENT_ID`
+PID_INFO=`ps -ef | grep asterix | grep -v grep | grep -v nc_join | grep $PARENT_ID`
PID=`echo $PID_INFO | cut -d " " -f2`
kill -9 $PID
diff --git a/asterix-events/src/main/resources/events/node_join/nc_join.sh b/asterix-events/src/main/resources/events/node_join/nc_join.sh
index 62d71ce..e0f5e55 100755
--- a/asterix-events/src/main/resources/events/node_join/nc_join.sh
+++ b/asterix-events/src/main/resources/events/node_join/nc_join.sh
@@ -4,8 +4,4 @@
then
mkdir -p $LOG_DIR
fi
-if [ ! -z $3 ];
-then
- JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=$3,server=y,suspend=n"
-fi
-$HYRACKS_HOME/bin/hyracksnc -node-id $NC_ID -cc-host $CC_HOST -cc-port 1099 -cluster-net-ip-address $IP_LOCATION -data-ip-address $IP_LOCATION &> $LOG_DIR/${NC_ID}.log
+$ASTERIX_HOME/bin/asterixnc -node-id $NC_ID -cc-host $CC_HOST -cc-port 1099 -cluster-net-ip-address $IP_LOCATION -data-ip-address $IP_LOCATION &> $LOG_DIR/${NC_ID}.log
diff --git a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/dataset/adapter/NCFileSystemAdapter.java b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/dataset/adapter/NCFileSystemAdapter.java
index 3276cea..ae9b412 100644
--- a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/dataset/adapter/NCFileSystemAdapter.java
+++ b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/dataset/adapter/NCFileSystemAdapter.java
@@ -61,7 +61,7 @@
return AdapterType.READ;
}
- private void configureFileSplits(String[] splits) throws AsterixException {
+ private void configureFileSplits(String[] splits) {
if (fileSplits == null) {
fileSplits = new FileSplit[splits.length];
String nodeName;
diff --git a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/feed/lifecycle/FeedManager.java b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/feed/lifecycle/FeedManager.java
index 6a5dae7..8314267 100644
--- a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/feed/lifecycle/FeedManager.java
+++ b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/feed/lifecycle/FeedManager.java
@@ -43,9 +43,7 @@
for (LinkedBlockingQueue<IFeedMessage> queue : operatorQueues) {
queue.put(feedMessage);
}
- } else {
- //throw new AsterixException("Unable to deliver message. Unknown feed :" + feedId);
- }
+ }
} catch (Exception e) {
throw new AsterixException(e);
}
diff --git a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/DNSResolver.java b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/DNSResolver.java
index 56d7872..ff6bbdf 100644
--- a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/DNSResolver.java
+++ b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/DNSResolver.java
@@ -35,7 +35,7 @@
if (nodeControllers == null || nodeControllers.isEmpty()) {
throw new AsterixException(" No node controllers found at the address: " + value);
}
- String chosenNCId = nodeControllers.toArray(new String[nodeControllers.size()])[random
+ String chosenNCId = nodeControllers.toArray(new String[]{})[random
.nextInt(nodeControllers.size())];
return chosenNCId;
} catch (AsterixException ae) {
diff --git a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/DNSResolverFactory.java b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/DNSResolverFactory.java
index 4c671e4..6b56601 100644
--- a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/DNSResolverFactory.java
+++ b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/DNSResolverFactory.java
@@ -19,7 +19,7 @@
*/
public class DNSResolverFactory implements INodeResolverFactory {
- private static INodeResolver INSTANCE = new DNSResolver();
+ private static final INodeResolver INSTANCE = new DNSResolver();
@Override
public INodeResolver createNodeResolver() {
diff --git a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/INodeResolver.java b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/INodeResolver.java
index a812f03..d0e8a64 100644
--- a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/INodeResolver.java
+++ b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/INodeResolver.java
@@ -16,6 +16,10 @@
import edu.uci.ics.asterix.common.exceptions.AsterixException;
+/**
+ * A policy for resolving a name to a node controller id.
+ *
+ */
public interface INodeResolver {
/**
diff --git a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/INodeResolverFactory.java b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/INodeResolverFactory.java
index 2a68e42..2abde9c 100644
--- a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/INodeResolverFactory.java
+++ b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/util/INodeResolverFactory.java
@@ -14,6 +14,11 @@
*/
package edu.uci.ics.asterix.external.util;
+/**
+ * Factory for creating an instance of INodeResolver
+ *
+ * @see INodeResolver
+ */
public interface INodeResolverFactory {
/**
diff --git a/asterix-installer/pom.xml b/asterix-installer/pom.xml
index d26d845..22af412 100644
--- a/asterix-installer/pom.xml
+++ b/asterix-installer/pom.xml
@@ -38,7 +38,7 @@
<configuration>
<schemaDirectory>src/main/resources/schema</schemaDirectory>
<schemaIncludes>
- <include>managix-conf.xsd</include>
+ <include>installer-conf.xsd</include>
</schemaIncludes>
<generatePackage>edu.uci.ics.asterix.installer.schema.conf</generatePackage>
<generateDirectory>${project.build.directory}/generated-sources/configuration</generateDirectory>
@@ -124,22 +124,8 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>edu.uci.ics.hyracks</groupId>
- <artifactId>hyracks-server</artifactId>
- <version>0.2.3-SNAPSHOT</version>
- <type>zip</type>
- <classifier>binary-assembly</classifier>
- </dependency>
- <dependency>
- <groupId>edu.uci.ics.hyracks</groupId>
- <artifactId>hyracks-cli</artifactId>
- <version>0.2.3-SNAPSHOT</version>
- <type>zip</type>
- <classifier>binary-assembly</classifier>
- </dependency>
- <dependency>
<groupId>edu.uci.ics.asterix</groupId>
- <artifactId>asterix-app</artifactId>
+ <artifactId>asterix-server</artifactId>
<version>0.0.4-SNAPSHOT</version>
<type>zip</type>
<classifier>binary-assembly</classifier>
diff --git a/asterix-installer/src/main/assembly/binary-assembly.xml b/asterix-installer/src/main/assembly/binary-assembly.xml
index 9788d2c..6a0c130 100644
--- a/asterix-installer/src/main/assembly/binary-assembly.xml
+++ b/asterix-installer/src/main/assembly/binary-assembly.xml
@@ -16,7 +16,7 @@
<fileSet>
<directory>src/main/resources/zookeeper</directory>
<fileMode>0755</fileMode>
- <outputDirectory>.managix/zookeeper/bin</outputDirectory>
+ <outputDirectory>.installer/zookeeper/bin</outputDirectory>
</fileSet>
<fileSet>
<directory>src/main/resources/scripts</directory>
@@ -32,11 +32,11 @@
<excludes>
<exclude>managix</exclude>
</excludes>
- <outputDirectory>.managix/scripts</outputDirectory>
+ <outputDirectory>.installer/scripts</outputDirectory>
</fileSet>
<fileSet>
<directory>src/main/resources/hadoop-0.20.2</directory>
- <outputDirectory>.managix/hadoop-0.20.2</outputDirectory>
+ <outputDirectory>.installer/hadoop-0.20.2</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
@@ -48,19 +48,18 @@
</fileSet>
<fileSet>
<directory>../asterix-events/src/main/resources/events</directory>
- <outputDirectory>.managix/eventrix/events</outputDirectory>
+ <outputDirectory>.installer/eventrix/events</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>../asterix-events/src/main/resources/scripts</directory>
- <outputDirectory>.managix/eventrix/scripts</outputDirectory>
+ <outputDirectory>.installer/eventrix/scripts</outputDirectory>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<includes>
<include>log4j:log4j</include>
- <include>commons-lang:commons-lang</include>
<include>edu.uci.ics.asterix:asterix-events</include>
<include>org.apache.zookeeper:zookeeper</include>
<include>args4j:args4j</include>
@@ -79,7 +78,7 @@
<include>commons-logging:commons-logging</include>
</includes>
<unpack>false</unpack>
- <outputDirectory>.managix/hadoop-0.20.2/lib</outputDirectory>
+ <outputDirectory>.installer/hadoop-0.20.2/lib</outputDirectory>
</dependencySet>
<dependencySet>
<includes>
@@ -88,33 +87,17 @@
<include>org.slf4j:slf4j-api</include>
</includes>
<unpack>false</unpack>
- <outputDirectory>.managix/zookeeper/lib</outputDirectory>
+ <outputDirectory>.installer/zookeeper/lib</outputDirectory>
</dependencySet>
<dependencySet>
<outputDirectory>asterix</outputDirectory>
<includes>
- <include>hyracks-server*</include>
- </includes>
- <unpack>false</unpack>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- </dependencySet>
- <dependencySet>
- <outputDirectory>asterix</outputDirectory>
- <includes>
- <include>hyracks-cli*</include>
- </includes>
- <unpack>false</unpack>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- </dependencySet>
- <dependencySet>
- <outputDirectory>asterix</outputDirectory>
- <includes>
- <include>asterix-app*</include>
+ <include>asterix-server*</include>
</includes>
<useTransitiveDependencies>false</useTransitiveDependencies>
</dependencySet>
<dependencySet>
- <outputDirectory>.managix/eventrix</outputDirectory>
+ <outputDirectory>.installer/eventrix</outputDirectory>
<includes>
<include>asterix-events*</include>
</includes>
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/AbstractCommand.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/AbstractCommand.java
index 2e199fb..8ebdea5 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/AbstractCommand.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/AbstractCommand.java
@@ -14,8 +14,8 @@
*/
package edu.uci.ics.asterix.installer.command;
-import java.util.logging.Logger;
+import org.apache.log4j.Logger;
import org.kohsuke.args4j.CmdLineParser;
public abstract class AbstractCommand implements ICommand {
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/AlterCommand.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/AlterCommand.java
index f5450ff..cbea918 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/AlterCommand.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/AlterCommand.java
@@ -19,7 +19,7 @@
import org.kohsuke.args4j.Option;
-import edu.uci.ics.asterix.installer.driver.ManagixUtil;
+import edu.uci.ics.asterix.installer.driver.InstallerUtil;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
import edu.uci.ics.asterix.installer.model.AsterixInstance.State;
import edu.uci.ics.asterix.installer.service.ILookupService;
@@ -30,14 +30,15 @@
@Override
protected void execCommand() throws Exception {
String instanceName = ((AlterConfig) config).name;
- ManagixUtil.validateAsterixInstanceExists(instanceName, State.INACTIVE);
+ InstallerUtil.validateAsterixInstanceExists(instanceName, State.INACTIVE);
ILookupService lookupService = ServiceProvider.INSTANCE.getLookupService();
AsterixInstance instance = lookupService.getAsterixInstance(instanceName);
- Properties asterixConfProp = ManagixUtil.getAsterixConfiguration(((AlterConfig) config).confPath);
+ Properties asterixConfProp = InstallerUtil.getAsterixConfiguration(((AlterConfig) config).confPath);
instance.setConfiguration(asterixConfProp);
instance.setModifiedTimestamp(new Date());
lookupService.updateAsterixInstance(instance);
+ LOGGER.info("Configuration for Asterix instance: " + instanceName + " has been altered");
}
@Override
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/BackupCommand.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/BackupCommand.java
index f8dcc80..58c309a 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/BackupCommand.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/BackupCommand.java
@@ -20,7 +20,7 @@
import org.kohsuke.args4j.Option;
import edu.uci.ics.asterix.event.schema.pattern.Patterns;
-import edu.uci.ics.asterix.installer.driver.ManagixUtil;
+import edu.uci.ics.asterix.installer.driver.InstallerUtil;
import edu.uci.ics.asterix.installer.events.PatternCreator;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
import edu.uci.ics.asterix.installer.model.AsterixInstance.State;
@@ -32,15 +32,15 @@
@Override
protected void execCommand() throws Exception {
String asterixInstanceName = ((BackupConfig) config).name;
- AsterixInstance instance = ManagixUtil.validateAsterixInstanceExists(asterixInstanceName, State.INACTIVE);
+ AsterixInstance instance = InstallerUtil.validateAsterixInstanceExists(asterixInstanceName, State.INACTIVE);
List<BackupInfo> backupInfo = instance.getBackupInfo();
PatternCreator pc = new PatternCreator();
Patterns patterns = pc.getBackUpAsterixPattern(instance, ((BackupConfig) config).localPath);
- ManagixUtil.getEventrixClient(instance.getCluster()).submit(patterns);
+ InstallerUtil.getEventrixClient(instance.getCluster()).submit(patterns);
int backupId = backupInfo.size();
BackupInfo binfo = new BackupInfo(backupId, new Date());
backupInfo.add(binfo);
- System.out.println(asterixInstanceName + " backed up " + binfo);
+ LOGGER.info(asterixInstanceName + " backed up " + binfo);
ServiceProvider.INSTANCE.getLookupService().updateAsterixInstance(instance);
}
@@ -51,7 +51,6 @@
@Override
protected String getUsageDescription() {
- // TODO Auto-generated method stub
return null;
}
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/CreateCommand.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/CreateCommand.java
index 5a3da5b..48016a5 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/CreateCommand.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/CreateCommand.java
@@ -27,8 +27,8 @@
import edu.uci.ics.asterix.event.schema.cluster.Env;
import edu.uci.ics.asterix.event.schema.cluster.Property;
import edu.uci.ics.asterix.event.schema.pattern.Patterns;
-import edu.uci.ics.asterix.installer.driver.ManagixDriver;
-import edu.uci.ics.asterix.installer.driver.ManagixUtil;
+import edu.uci.ics.asterix.installer.driver.InstallerDriver;
+import edu.uci.ics.asterix.installer.driver.InstallerUtil;
import edu.uci.ics.asterix.installer.error.VerificationUtil;
import edu.uci.ics.asterix.installer.events.PatternCreator;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
@@ -43,17 +43,18 @@
@Override
protected void execCommand() throws Exception {
asterixInstanceName = ((CreateConfig) config).name;
- ManagixUtil.validateAsterixInstanceNotExists(asterixInstanceName);
+ InstallerUtil.validateAsterixInstanceNotExists(asterixInstanceName);
CreateConfig createConfig = (CreateConfig) config;
JAXBContext ctx = JAXBContext.newInstance(Cluster.class);
Unmarshaller unmarshaller = ctx.createUnmarshaller();
cluster = (Cluster) unmarshaller.unmarshal(new File(createConfig.clusterPath));
- AsterixInstance asterixInstance = ManagixUtil.createAsterixInstance(asterixInstanceName, cluster,
+ AsterixInstance asterixInstance = InstallerUtil.createAsterixInstance(asterixInstanceName, cluster,
((CreateConfig) config).asterixConf);
- ManagixUtil.createAsterixZip(asterixInstance, true);
+ InstallerUtil.evaluateConflictWithOtherInstances(asterixInstance);
+ InstallerUtil.createAsterixZip(asterixInstance, true);
List<Property> clusterProperties = new ArrayList<Property>();
- clusterProperties.add(new Property("HYRACKS_HOME", cluster.getWorkingDir().getDir() + File.separator
- + "hyracks"));
+ clusterProperties.add(new Property("ASTERIX_HOME", cluster.getWorkingDir().getDir() + File.separator
+ + "asterix"));
clusterProperties.add(new Property("JAVA_OPTS", "-Xmx" + cluster.getRam()));
clusterProperties.add(new Property("CLUSTER_NET_IP", cluster.getMasterNode().getClusterIp()));
clusterProperties.add(new Property("CLIENT_NET_IP", cluster.getMasterNode().getIp()));
@@ -63,14 +64,14 @@
PatternCreator pc = new PatternCreator();
Patterns patterns = pc.getStartAsterixPattern(asterixInstanceName, cluster);
- ManagixUtil.getEventrixClient(cluster).submit(patterns);
+ InstallerUtil.getEventrixClient(cluster).submit(patterns);
AsterixRuntimeState runtimeState = VerificationUtil.getAsterixRuntimeState(asterixInstance);
VerificationUtil.updateInstanceWithRuntimeDescription(asterixInstance, runtimeState, true);
ServiceProvider.INSTANCE.getLookupService().writeAsterixInstance(asterixInstance);
- System.out.println(asterixInstance.getDescription(false));
- ManagixUtil.deleteDirectory(ManagixDriver.getManagixHome() + File.separator + ManagixDriver.ASTERIX_DIR
+ InstallerUtil.deleteDirectory(InstallerDriver.getManagixHome() + File.separator + InstallerDriver.ASTERIX_DIR
+ File.separator + asterixInstanceName);
+ LOGGER.info(asterixInstance.getDescription(false));
}
@@ -89,7 +90,6 @@
@Override
protected String getUsageDescription() {
- // TODO Auto-generated method stub
return null;
}
}
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/DeleteCommand.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/DeleteCommand.java
index 60ce4c1..dc4d53e 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/DeleteCommand.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/DeleteCommand.java
@@ -14,12 +14,10 @@
*/
package edu.uci.ics.asterix.installer.command;
-import java.util.logging.Level;
-
import org.kohsuke.args4j.Option;
import edu.uci.ics.asterix.event.schema.pattern.Patterns;
-import edu.uci.ics.asterix.installer.driver.ManagixUtil;
+import edu.uci.ics.asterix.installer.driver.InstallerUtil;
import edu.uci.ics.asterix.installer.events.PatternCreator;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
import edu.uci.ics.asterix.installer.model.AsterixInstance.State;
@@ -30,12 +28,12 @@
@Override
protected void execCommand() throws Exception {
String asterixInstanceName = ((DeleteConfig) config).name;
- AsterixInstance instance = ManagixUtil.validateAsterixInstanceExists(asterixInstanceName, State.INACTIVE);
+ AsterixInstance instance = InstallerUtil.validateAsterixInstanceExists(asterixInstanceName, State.INACTIVE);
PatternCreator pc = new PatternCreator();
Patterns patterns = pc.createDeleteInstancePattern(instance);
- ManagixUtil.getEventrixClient(instance.getCluster()).submit(patterns);
+ InstallerUtil.getEventrixClient(instance.getCluster()).submit(patterns);
ServiceProvider.INSTANCE.getLookupService().removeAsterixInstance(asterixInstanceName);
- LOGGER.log(Level.INFO, " Asterix instance: " + asterixInstanceName + " deleted");
+ LOGGER.info(" Asterix instance: " + asterixInstanceName + " deleted");
}
@Override
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/DescribeCommand.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/DescribeCommand.java
index 6b6536a..977acaf 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/DescribeCommand.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/DescribeCommand.java
@@ -18,8 +18,8 @@
import org.kohsuke.args4j.Option;
-import edu.uci.ics.asterix.installer.driver.ManagixUtil;
-import edu.uci.ics.asterix.installer.error.ManagixException;
+import edu.uci.ics.asterix.installer.driver.InstallerUtil;
+import edu.uci.ics.asterix.installer.error.InstallerException;
import edu.uci.ics.asterix.installer.error.VerificationUtil;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
import edu.uci.ics.asterix.installer.model.AsterixInstance.State;
@@ -33,8 +33,8 @@
String asterixInstanceName = ((DescribeConfig) config).name;
boolean adminView = ((DescribeConfig) config).admin;
if (asterixInstanceName != null) {
- ManagixUtil
- .validateAsterixInstanceExists(asterixInstanceName, State.INACTIVE, State.ACTIVE, State.UNUSABLE);
+ InstallerUtil.validateAsterixInstanceExists(asterixInstanceName, State.INACTIVE, State.ACTIVE,
+ State.UNUSABLE);
AsterixInstance instance = ServiceProvider.INSTANCE.getLookupService().getAsterixInstance(
asterixInstanceName);
if (instance != null) {
@@ -43,9 +43,9 @@
.equals(State.ACTIVE) : !instance.getState().equals(State.INACTIVE);
VerificationUtil.updateInstanceWithRuntimeDescription(instance, state, expectedRunning);
ServiceProvider.INSTANCE.getLookupService().updateAsterixInstance(instance);
- System.out.println(instance.getDescription(adminView));
+ LOGGER.info(instance.getDescription(adminView));
} else {
- throw new ManagixException("Asterix instance by the name " + asterixInstanceName + " does not exist.");
+ throw new InstallerException("Asterix instance by the name " + asterixInstanceName + " does not exist.");
}
} else {
List<AsterixInstance> asterixInstances = ServiceProvider.INSTANCE.getLookupService().getAsterixInstances();
@@ -56,7 +56,7 @@
.equals(State.ACTIVE) : !instance.getState().equals(State.INACTIVE);
VerificationUtil.updateInstanceWithRuntimeDescription(instance, state, expectedRunning);
ServiceProvider.INSTANCE.getLookupService().updateAsterixInstance(instance);
- System.out.println(instance.getDescription(adminView));
+ LOGGER.info(instance.getDescription(adminView));
}
} else {
LOGGER.info("No Asterix instances found!");
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/RestoreCommand.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/RestoreCommand.java
index 620c88f..777d179 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/RestoreCommand.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/RestoreCommand.java
@@ -17,7 +17,7 @@
import org.kohsuke.args4j.Option;
import edu.uci.ics.asterix.event.schema.pattern.Patterns;
-import edu.uci.ics.asterix.installer.driver.ManagixUtil;
+import edu.uci.ics.asterix.installer.driver.InstallerUtil;
import edu.uci.ics.asterix.installer.events.PatternCreator;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
import edu.uci.ics.asterix.installer.model.AsterixInstance.State;
@@ -27,14 +27,15 @@
@Override
protected void execCommand() throws Exception {
String asterixInstanceName = ((RestoreConfig) config).name;
- AsterixInstance instance = ManagixUtil.validateAsterixInstanceExists(asterixInstanceName, State.INACTIVE);
+ AsterixInstance instance = InstallerUtil.validateAsterixInstanceExists(asterixInstanceName, State.INACTIVE);
int backupId = ((RestoreConfig) config).backupId;
if (instance.getBackupInfo().size() <= backupId || backupId < 0) {
throw new IllegalStateException("Invalid backup id");
}
PatternCreator pc = new PatternCreator();
Patterns patterns = pc.getRestoreAsterixPattern(instance, backupId);
- ManagixUtil.getEventrixClient(instance.getCluster()).submit(patterns);
+ InstallerUtil.getEventrixClient(instance.getCluster()).submit(patterns);
+ LOGGER.info("Asterix instance: " + asterixInstanceName + " has been restored from backup");
}
@Override
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/StartCommand.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/StartCommand.java
index 3c5e32f..99dfaa5 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/StartCommand.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/StartCommand.java
@@ -19,8 +19,8 @@
import org.kohsuke.args4j.Option;
import edu.uci.ics.asterix.event.schema.pattern.Patterns;
-import edu.uci.ics.asterix.installer.driver.ManagixDriver;
-import edu.uci.ics.asterix.installer.driver.ManagixUtil;
+import edu.uci.ics.asterix.installer.driver.InstallerDriver;
+import edu.uci.ics.asterix.installer.driver.InstallerUtil;
import edu.uci.ics.asterix.installer.error.VerificationUtil;
import edu.uci.ics.asterix.installer.events.PatternCreator;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
@@ -33,16 +33,16 @@
@Override
protected void execCommand() throws Exception {
String asterixInstanceName = ((StartConfig) config).name;
- AsterixInstance instance = ManagixUtil.validateAsterixInstanceExists(asterixInstanceName, State.INACTIVE);
- ManagixUtil.createAsterixZip(instance, false);
+ AsterixInstance instance = InstallerUtil.validateAsterixInstanceExists(asterixInstanceName, State.INACTIVE);
+ InstallerUtil.createAsterixZip(instance, false);
PatternCreator pc = new PatternCreator();
Patterns patterns = pc.getStartAsterixPattern(asterixInstanceName, instance.getCluster());
- ManagixUtil.getEventrixClient(instance.getCluster()).submit(patterns);
- ManagixUtil.deleteDirectory(ManagixDriver.getManagixHome() + File.separator + ManagixDriver.ASTERIX_DIR
+ InstallerUtil.getEventrixClient(instance.getCluster()).submit(patterns);
+ InstallerUtil.deleteDirectory(InstallerDriver.getManagixHome() + File.separator + InstallerDriver.ASTERIX_DIR
+ File.separator + asterixInstanceName);
AsterixRuntimeState runtimeState = VerificationUtil.getAsterixRuntimeState(instance);
VerificationUtil.updateInstanceWithRuntimeDescription(instance, runtimeState, true);
- System.out.println(instance.getDescription(false));
+ LOGGER.info(instance.getDescription(false));
ServiceProvider.INSTANCE.getLookupService().updateAsterixInstance(instance);
}
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/StopCommand.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/StopCommand.java
index d82d751..81b147a 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/StopCommand.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/StopCommand.java
@@ -24,7 +24,7 @@
import edu.uci.ics.asterix.event.schema.cluster.Node;
import edu.uci.ics.asterix.event.schema.pattern.Pattern;
import edu.uci.ics.asterix.event.schema.pattern.Patterns;
-import edu.uci.ics.asterix.installer.driver.ManagixUtil;
+import edu.uci.ics.asterix.installer.driver.InstallerUtil;
import edu.uci.ics.asterix.installer.events.PatternCreator;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
import edu.uci.ics.asterix.installer.model.AsterixInstance.State;
@@ -35,8 +35,8 @@
@Override
protected void execCommand() throws Exception {
String asterixInstanceName = ((StopConfig) config).name;
- AsterixInstance asterixInstance = ManagixUtil.validateAsterixInstanceExists(asterixInstanceName, State.ACTIVE,
- State.UNUSABLE);
+ AsterixInstance asterixInstance = InstallerUtil.validateAsterixInstanceExists(asterixInstanceName,
+ State.ACTIVE, State.UNUSABLE);
PatternCreator pc = new PatternCreator();
List<Pattern> patternsToExecute = new ArrayList<Pattern>();
patternsToExecute.add(pc.createCCStopPattern(asterixInstance.getCluster().getMasterNode().getId()));
@@ -44,15 +44,17 @@
for (Node node : asterixInstance.getCluster().getNode()) {
patternsToExecute.add(pc.createNCStopPattern(node.getId(), asterixInstanceName + "_" + node.getId()));
}
- EventrixClient client = ManagixUtil.getEventrixClient(asterixInstance.getCluster());
+ EventrixClient client = InstallerUtil.getEventrixClient(asterixInstance.getCluster());
try {
client.submit(new Patterns(patternsToExecute));
} catch (Exception e) {
// processes are already dead
+ LOGGER.debug("Attempt to kill non-existing processess");
}
asterixInstance.setState(State.INACTIVE);
asterixInstance.setStateChangeTimestamp(new Date());
ServiceProvider.INSTANCE.getLookupService().updateAsterixInstance(asterixInstance);
+ LOGGER.info("Stopped Asterix instance: " + asterixInstanceName);
}
@Override
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/ManagixDriver.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerDriver.java
similarity index 76%
rename from asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/ManagixDriver.java
rename to asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerDriver.java
index 1474ca9..f435b8d 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/ManagixDriver.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerDriver.java
@@ -16,56 +16,39 @@
import java.io.File;
import java.io.FileFilter;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
-import edu.uci.ics.asterix.event.schema.event.Events;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+
import edu.uci.ics.asterix.installer.command.CommandHandler;
import edu.uci.ics.asterix.installer.schema.conf.Configuration;
import edu.uci.ics.asterix.installer.service.ILookupService;
import edu.uci.ics.asterix.installer.service.ServiceProvider;
-@SuppressWarnings("restriction")
-public class ManagixDriver {
+public class InstallerDriver {
- public static final String MANAGIX_INTERNAL_DIR = ".managix";
+ public static final String MANAGIX_INTERNAL_DIR = ".installer";
public static final String MANAGIX_EVENT_DIR = MANAGIX_INTERNAL_DIR + File.separator + "eventrix";
public static final String MANAGIX_EVENT_SCRIPTS_DIR = MANAGIX_INTERNAL_DIR + File.separator + "eventrix"
+ File.separator + "scripts";
-
public static final String ASTERIX_DIR = "asterix";
public static final String EVENTS_DIR = "events";
- private static final Logger LOGGER = Logger.getLogger(ManagixDriver.class.getName());
+ private static final Logger LOGGER = Logger.getLogger(InstallerDriver.class.getName());
private static final String ENV_MANAGIX_HOME = "MANAGIX_HOME";
- private static final String MANAGIX_CONF_XML = "conf" + File.separator + "managix-conf.xml";
+ private static final String MANAGIX_CONF_XML = "conf" + File.separator + "installer-conf.xml";
private static Configuration conf;
private static String managixHome;
- private static String hyracksServerZip;
- private static String hyracksClientZip;
private static String asterixZip;
- private static Events events;
-
- public static String getHyrackServerZip() {
- return hyracksServerZip;
- }
-
- public static String getHyracksClientZip() {
- return hyracksClientZip;
- }
public static String getAsterixZip() {
return asterixZip;
}
- public static String getHyracksClientHome() {
- return ASTERIX_DIR + File.separator + "hyracks-cli";
- }
-
public static Configuration getConfiguration() {
return conf;
}
@@ -76,11 +59,7 @@
JAXBContext configCtx = JAXBContext.newInstance(Configuration.class);
Unmarshaller unmarshaller = configCtx.createUnmarshaller();
conf = (Configuration) unmarshaller.unmarshal(configFile);
-
- hyracksServerZip = initBinary("hyracks-server");
- hyracksClientZip = initBinary("hyracks-cli");
- ManagixUtil.unzip(hyracksClientZip, getHyracksClientHome());
- asterixZip = initBinary("asterix-app");
+ asterixZip = initBinary("asterix-server");
ILookupService lookupService = ServiceProvider.INSTANCE.getLookupService();
if (!lookupService.isRunning(conf)) {
@@ -89,7 +68,7 @@
}
private static String initBinary(final String fileNamePattern) {
- String asterixDir = ManagixDriver.getAsterixDir();
+ String asterixDir = InstallerDriver.getAsterixDir();
File file = new File(asterixDir);
File[] zipFiles = file.listFiles(new FileFilter() {
public boolean accept(File arg0) {
@@ -98,12 +77,12 @@
});
if (zipFiles.length == 0) {
String msg = " Binary not found at " + asterixDir;
- LOGGER.log(Level.SEVERE, msg);
+ LOGGER.log(Level.FATAL, msg);
throw new IllegalStateException(msg);
}
if (zipFiles.length > 1) {
String msg = " Multiple binaries found at " + asterixDir;
- LOGGER.log(Level.SEVERE, msg);
+ LOGGER.log(Level.FATAL, msg);
throw new IllegalStateException(msg);
}
@@ -118,10 +97,6 @@
return managixHome + File.separator + ASTERIX_DIR;
}
- public static Events getEvents() {
- return events;
- }
-
public static void main(String args[]) {
try {
if (args.length != 0) {
@@ -132,11 +107,10 @@
printUsage();
}
} catch (IllegalArgumentException iae) {
- LOGGER.log(Level.SEVERE, "Unknown command");
+ LOGGER.error("Unknown command");
printUsage();
} catch (Exception e) {
- e.printStackTrace();
- LOGGER.log(Level.SEVERE, e.getMessage());
+ LOGGER.error(e.getMessage());
}
}
@@ -151,6 +125,6 @@
buffer.append("restore " + ":" + " Restores an asterix instance" + "\n");
buffer.append("alter " + ":" + " Alters the configuration for an existing asterix instance" + "\n");
buffer.append("describe " + ":" + " Describes an existing asterix instance" + "\n");
- LOGGER.log(Level.INFO, buffer.toString());
+ LOGGER.info(buffer.toString());
}
}
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/ManagixUtil.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerUtil.java
similarity index 80%
rename from asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/ManagixUtil.java
rename to asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerUtil.java
index f849151..cd3ebdb 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/ManagixUtil.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerUtil.java
@@ -43,43 +43,39 @@
import edu.uci.ics.asterix.event.management.EventrixClient;
import edu.uci.ics.asterix.event.schema.cluster.Cluster;
import edu.uci.ics.asterix.event.schema.cluster.Node;
-import edu.uci.ics.asterix.installer.error.ManagixException;
+import edu.uci.ics.asterix.installer.error.InstallerException;
import edu.uci.ics.asterix.installer.error.OutputHandler;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
import edu.uci.ics.asterix.installer.model.AsterixInstance.State;
import edu.uci.ics.asterix.installer.service.ServiceProvider;
-public class ManagixUtil {
+public class InstallerUtil {
public static AsterixInstance createAsterixInstance(String asterixInstanceName, Cluster cluster, String asterixConf)
throws FileNotFoundException, IOException {
Properties asterixConfProp = getAsterixConfiguration(asterixConf);
Node metadataNode = getMetadataNode(cluster);
- String asterixZipName = ManagixDriver.getAsterixZip().substring(
- ManagixDriver.getAsterixZip().lastIndexOf(File.separator) + 1);
- String asterixVersion = asterixZipName.substring("asterix-app-".length(),
+ String asterixZipName = InstallerDriver.getAsterixZip().substring(
+ InstallerDriver.getAsterixZip().lastIndexOf(File.separator) + 1);
+ String asterixVersion = asterixZipName.substring("asterix-server-".length(),
asterixZipName.indexOf("-binary-assembly"));
- String hyracksZipName = ManagixDriver.getHyrackServerZip().substring(
- ManagixDriver.getHyrackServerZip().lastIndexOf(File.separator) + 1);
- String hyracksVersion = hyracksZipName.substring("hyracks-server-".length(),
- hyracksZipName.indexOf("-binary-assembly"));
AsterixInstance instance = new AsterixInstance(asterixInstanceName, cluster, asterixConfProp,
- metadataNode.getId(), asterixVersion, hyracksVersion);
+ metadataNode.getId(), asterixVersion);
return instance;
}
public static void createAsterixZip(AsterixInstance asterixInstance, boolean newDeployment) throws IOException {
writeAsterixConfigurationFile(asterixInstance, newDeployment);
- String asterixInstanceDir = ManagixDriver.getAsterixDir() + File.separator + asterixInstance.getName();
- unzip(ManagixDriver.getAsterixZip(), asterixInstanceDir);
+ String asterixInstanceDir = InstallerDriver.getAsterixDir() + File.separator + asterixInstance.getName();
+ unzip(InstallerDriver.getAsterixZip(), asterixInstanceDir);
File sourceJar = new File(asterixInstanceDir + File.separator + "lib" + File.separator + "asterix-app-"
+ asterixInstance.getAsterixVersion() + ".jar");
String origFile = "test.properties";
File replacementFile = new File(asterixInstanceDir + File.separator + "test.properties");
replaceInJar(sourceJar, origFile, replacementFile);
new File(asterixInstanceDir + File.separator + "test.properties").delete();
- String asterixZipName = ManagixDriver.getAsterixZip().substring(
- ManagixDriver.getAsterixZip().lastIndexOf(File.separator) + 1);
+ String asterixZipName = InstallerDriver.getAsterixZip().substring(
+ InstallerDriver.getAsterixZip().lastIndexOf(File.separator) + 1);
zipDir(new File(asterixInstanceDir), new File(asterixInstanceDir + File.separator + asterixZipName));
}
@@ -129,9 +125,9 @@
Properties asterixConfProp = asterixInstance.getConfiguration();
String outputDir = asterixConfProp.getProperty("output_dir");
conf.append("OutputDir=" + outputDir);
- File asterixConfDir = new File(ManagixDriver.getAsterixDir() + File.separator + asterixInstanceName);
+ File asterixConfDir = new File(InstallerDriver.getAsterixDir() + File.separator + asterixInstanceName);
asterixConfDir.mkdirs();
- dumpToFile(ManagixDriver.getAsterixDir() + File.separator + asterixInstanceName + File.separator
+ dumpToFile(InstallerDriver.getAsterixDir() + File.separator + asterixInstanceName + File.separator
+ "test.properties", conf.toString());
}
@@ -254,7 +250,7 @@
throws Exception {
AsterixInstance instance = ServiceProvider.INSTANCE.getLookupService().getAsterixInstance(name);
if (instance == null) {
- throw new ManagixException(" Asterix instance by name " + name + " does not exist.");
+ throw new InstallerException(" Asterix instance by name " + name + " does not exist.");
}
boolean valid = false;
for (State state : permissibleStates) {
@@ -264,7 +260,7 @@
}
}
if (!valid) {
- throw new ManagixException(" Asterix instance by the name " + name + " is in " + instance.getState()
+ throw new InstallerException(" Asterix instance by the name " + name + " is in " + instance.getState()
+ " state ");
}
return instance;
@@ -273,7 +269,37 @@
public static void validateAsterixInstanceNotExists(String name) throws Exception {
AsterixInstance instance = ServiceProvider.INSTANCE.getLookupService().getAsterixInstance(name);
if (instance != null) {
- throw new ManagixException(" Asterix instance by name " + name + " already exists.");
+ throw new InstallerException(" Asterix instance by name " + name + " already exists.");
+ }
+ }
+
+ public static void evaluateConflictWithOtherInstances(AsterixInstance instance) throws Exception {
+ List<AsterixInstance> existingInstances = ServiceProvider.INSTANCE.getLookupService().getAsterixInstances();
+ List<String> usedIps = new ArrayList<String>();
+ String masterIp = instance.getCluster().getMasterNode().getIp();
+ for (Node node : instance.getCluster().getNode()) {
+ usedIps.add(node.getIp());
+ }
+ usedIps.add(instance.getCluster().getMasterNode().getIp());
+ boolean conflictFound = false;
+ AsterixInstance conflictingInstance = null;
+ for (AsterixInstance existing : existingInstances) {
+ conflictFound = existing.getCluster().getMasterNode().getIp().equals(masterIp);
+ if (conflictFound) {
+ conflictingInstance = existing;
+ break;
+ }
+ for (Node n : existing.getCluster().getNode()) {
+ if (usedIps.contains(n.getIp())) {
+ conflictFound = true;
+ conflictingInstance = existing;
+ break;
+ }
+ }
+ }
+ if (conflictFound) {
+ throw new Exception("Cluster definition conflicts with an existing instance of Asterix: "
+ + conflictingInstance.getName());
}
}
@@ -299,8 +325,9 @@
}
public static EventrixClient getEventrixClient(Cluster cluster) throws Exception {
- return new EventrixClient(ManagixDriver.getManagixHome() + File.separator + ManagixDriver.MANAGIX_EVENT_DIR,
- cluster, false, OutputHandler.INSTANCE);
+ return new EventrixClient(
+ InstallerDriver.getManagixHome() + File.separator + InstallerDriver.MANAGIX_EVENT_DIR, cluster, false,
+ OutputHandler.INSTANCE);
}
}
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/ManagixConfig.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/ManagixConfig.java
deleted file mode 100644
index f955caf..0000000
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/ManagixConfig.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2009-2012 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.installer.driver;
-
-import java.util.Set;
-
-class ManagixConfig {
-
- public String asterixHome;
- public String hyracksHome;
- public String hdfsUrl;
- public Set<String> zookeeperNodes;
-}
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/error/ManagixException.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/error/InstallerException.java
similarity index 88%
rename from asterix-installer/src/main/java/edu/uci/ics/asterix/installer/error/ManagixException.java
rename to asterix-installer/src/main/java/edu/uci/ics/asterix/installer/error/InstallerException.java
index e13a2f4..89dedb6 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/error/ManagixException.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/error/InstallerException.java
@@ -14,11 +14,11 @@
*/
package edu.uci.ics.asterix.installer.error;
-public class ManagixException extends Exception {
+public class InstallerException extends Exception {
private static final long serialVersionUID = 1L;
- public ManagixException(String message) {
+ public InstallerException(String message) {
super(message);
}
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/error/VerificationUtil.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/error/VerificationUtil.java
index 3b157ec..48988e8 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/error/VerificationUtil.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/error/VerificationUtil.java
@@ -20,8 +20,8 @@
import edu.uci.ics.asterix.event.schema.cluster.Cluster;
import edu.uci.ics.asterix.event.schema.cluster.Node;
-import edu.uci.ics.asterix.installer.driver.ManagixDriver;
-import edu.uci.ics.asterix.installer.driver.ManagixUtil;
+import edu.uci.ics.asterix.installer.driver.InstallerDriver;
+import edu.uci.ics.asterix.installer.driver.InstallerUtil;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
import edu.uci.ics.asterix.installer.model.AsterixInstance.State;
import edu.uci.ics.asterix.installer.model.AsterixRuntimeState;
@@ -29,8 +29,8 @@
public class VerificationUtil {
- private static final String VERIFY_SCRIPT_PATH = ManagixDriver.getManagixHome() + File.separator
- + ManagixDriver.MANAGIX_INTERNAL_DIR + File.separator + "scripts" + File.separator + "verify.sh";
+ private static final String VERIFY_SCRIPT_PATH = InstallerDriver.getManagixHome() + File.separator
+ + InstallerDriver.MANAGIX_INTERNAL_DIR + File.separator + "scripts" + File.separator + "verify.sh";
public static AsterixRuntimeState getAsterixRuntimeState(AsterixInstance instance) throws Exception {
@@ -43,7 +43,7 @@
args.add(instance.getName() + "_" + node.getId());
}
- String output = ManagixUtil.executeLocalScript(VERIFY_SCRIPT_PATH, args);
+ String output = InstallerUtil.executeLocalScript(VERIFY_SCRIPT_PATH, args);
boolean ccRunning = true;
List<String> failedNCs = new ArrayList<String>();
String[] infoFields;
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/events/PatternCreator.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/events/PatternCreator.java
index 74bdbc2..9db74b0 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/events/PatternCreator.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/events/PatternCreator.java
@@ -29,7 +29,7 @@
import edu.uci.ics.asterix.event.schema.pattern.Patterns;
import edu.uci.ics.asterix.event.schema.pattern.Value;
import edu.uci.ics.asterix.installer.command.StopCommand;
-import edu.uci.ics.asterix.installer.driver.ManagixDriver;
+import edu.uci.ics.asterix.installer.driver.InstallerDriver;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
import edu.uci.ics.asterix.installer.service.ILookupService;
import edu.uci.ics.asterix.installer.service.ServiceProvider;
@@ -38,8 +38,6 @@
private static final Logger LOGGER = Logger.getLogger(PatternCreator.class.getName());
private ILookupService lookupService = ServiceProvider.INSTANCE.getLookupService();
- private static int CC_DEBUG_PORT = 8800;
- private static int NC_DEBUG_PORT = 8701;
private void addInitialDelay(Pattern p, int delay, String unit) {
Delay d = new Delay(new Value(null, "" + delay), unit);
@@ -50,20 +48,20 @@
String ccLocationId = cluster.getMasterNode().getId();
String ccLocationIp = cluster.getMasterNode().getIp();
- String destDir = cluster.getWorkingDir().getDir() + File.separator + "hyracks";
+ String destDir = cluster.getWorkingDir().getDir() + File.separator + "asterix";
List<Pattern> ps = new ArrayList<Pattern>();
+ Pattern copyHyracks = createCopyHyracksPattern(asterixInstanceName, cluster, ccLocationIp, destDir);
+ ps.add(copyHyracks);
+
Pattern createCC = createCCStartPattern(ccLocationId);
addInitialDelay(createCC, 2, "sec");
ps.add(createCC);
- Pattern copyHyracks = createCopyHyracksPattern(cluster, ccLocationIp, destDir);
- ps.add(copyHyracks);
-
boolean copyHyracksToNC = !cluster.getWorkingDir().isNFS();
for (Node node : cluster.getNode()) {
if (copyHyracksToNC) {
- Pattern copyHyracksForNC = createCopyHyracksPattern(cluster, node.getIp(), destDir);
+ Pattern copyHyracksForNC = createCopyHyracksPattern(asterixInstanceName, cluster, node.getIp(), destDir);
ps.add(copyHyracksForNC);
}
Pattern createNC = createNCStartPattern(cluster.getMasterNode().getIp(), node.getId(), asterixInstanceName
@@ -72,10 +70,6 @@
ps.add(createNC);
}
- Pattern asterixDeploy = createAsterixDeployPattern(asterixInstanceName, cluster);
- addInitialDelay(asterixDeploy, 6, "sec");
- ps.add(asterixDeploy);
-
Patterns patterns = new Patterns(ps);
patterns.getPattern().addAll(createHadoopLibraryTransferPattern(cluster).getPattern());
return patterns;
@@ -106,9 +100,9 @@
public Patterns getBackUpAsterixPattern(AsterixInstance instance, String backupPath) throws Exception {
Cluster cluster = instance.getCluster();
String clusterStore = instance.getCluster().getStore();
- String hdfsUrl = ManagixDriver.getConfiguration().getBackup().getHdfs().getUrl();
- String hadoopVersion = ManagixDriver.getConfiguration().getBackup().getHdfs().getVersion();
- String hdfsBackupDir = ManagixDriver.getConfiguration().getBackup().getHdfs().getBackupDir();
+ String hdfsUrl = InstallerDriver.getConfiguration().getBackup().getHdfs().getUrl();
+ String hadoopVersion = InstallerDriver.getConfiguration().getBackup().getHdfs().getVersion();
+ String hdfsBackupDir = InstallerDriver.getConfiguration().getBackup().getHdfs().getBackupDir();
String workingDir = cluster.getWorkingDir().getDir();
String backupId = "" + instance.getBackupInfo().size();
String nodeStore;
@@ -128,9 +122,9 @@
public Patterns getRestoreAsterixPattern(AsterixInstance instance, int backupId) throws Exception {
Cluster cluster = instance.getCluster();
String clusterStore = instance.getCluster().getStore();
- String hdfsUrl = ManagixDriver.getConfiguration().getBackup().getHdfs().getUrl();
- String hadoopVersion = ManagixDriver.getConfiguration().getBackup().getHdfs().getVersion();
- String hdfsBackupDir = ManagixDriver.getConfiguration().getBackup().getHdfs().getBackupDir();
+ String hdfsUrl = InstallerDriver.getConfiguration().getBackup().getHdfs().getUrl();
+ String hadoopVersion = InstallerDriver.getConfiguration().getBackup().getHdfs().getVersion();
+ String hdfsBackupDir = InstallerDriver.getConfiguration().getBackup().getHdfs().getBackupDir();
String workingDir = cluster.getWorkingDir().getDir();
String nodeStore;
String pargs;
@@ -149,9 +143,9 @@
public Patterns createHadoopLibraryTransferPattern(Cluster cluster) throws Exception {
List<Pattern> patternList = new ArrayList<Pattern>();
String workingDir = cluster.getWorkingDir().getDir();
- String hadoopVersion = ManagixDriver.getConfiguration().getBackup().getHdfs().getVersion();
- File hadoopDir = new File(ManagixDriver.getManagixHome() + File.separator + ManagixDriver.MANAGIX_INTERNAL_DIR
- + File.separator + "hadoop-" + hadoopVersion);
+ String hadoopVersion = InstallerDriver.getConfiguration().getBackup().getHdfs().getVersion();
+ File hadoopDir = new File(InstallerDriver.getManagixHome() + File.separator
+ + InstallerDriver.MANAGIX_INTERNAL_DIR + File.separator + "hadoop-" + hadoopVersion);
if (!hadoopDir.exists()) {
throw new IllegalStateException("Hadoop version :" + hadoopVersion + " not supported");
}
@@ -194,9 +188,9 @@
private Patterns createRemoveHDFSBackupPattern(AsterixInstance instance) throws Exception {
List<Pattern> patternList = new ArrayList<Pattern>();
Cluster cluster = instance.getCluster();
- String hdfsUrl = ManagixDriver.getConfiguration().getBackup().getHdfs().getUrl();
- String hadoopVersion = ManagixDriver.getConfiguration().getBackup().getHdfs().getVersion();
- String hdfsBackupDir = ManagixDriver.getConfiguration().getBackup().getHdfs().getBackupDir();
+ String hdfsUrl = InstallerDriver.getConfiguration().getBackup().getHdfs().getUrl();
+ String hadoopVersion = InstallerDriver.getConfiguration().getBackup().getHdfs().getVersion();
+ String hdfsBackupDir = InstallerDriver.getConfiguration().getBackup().getHdfs().getBackupDir();
String workingDir = cluster.getWorkingDir().getDir();
Node launchingNode = cluster.getNode().get(0);
Nodeid nodeid = new Nodeid(new Value(null, launchingNode.getId()));
@@ -234,19 +228,21 @@
return patterns;
}
- private Pattern createCopyHyracksPattern(Cluster cluster, String destinationIp, String destDir) {
+ private Pattern createCopyHyracksPattern(String instanceName, Cluster cluster, String destinationIp, String destDir) {
Nodeid nodeid = new Nodeid(new Value(null, EventDriver.CLIENT_NODE.getId()));
String username = cluster.getUsername() != null ? cluster.getUsername() : System.getProperty("user.name");
- String pargs = username + " " + ManagixDriver.getHyrackServerZip() + " " + destinationIp + " " + destDir + " "
- + "unpack";
+ String asterixZipName = InstallerDriver.getAsterixZip().substring(
+ InstallerDriver.getAsterixZip().lastIndexOf(File.separator) + 1);
+ String fileToTransfer = InstallerDriver.getAsterixDir() + File.separator + instanceName + File.separator
+ + asterixZipName;
+ String pargs = username + " " + fileToTransfer + " " + destinationIp + " " + destDir + " " + "unpack";
Event event = new Event("file_transfer", nodeid, pargs);
return new Pattern(null, 1, null, event);
}
private Pattern createCCStartPattern(String hostId) {
Nodeid nodeid = new Nodeid(new Value(null, hostId));
- Event event = new Event("cc_start", nodeid, "" + CC_DEBUG_PORT);
- CC_DEBUG_PORT++;
+ Event event = new Event("cc_start", nodeid, "");
return new Pattern(null, 1, null, event);
}
@@ -258,8 +254,7 @@
public Pattern createNCStartPattern(String ccHost, String hostId, String nodeControllerId) {
Nodeid nodeid = new Nodeid(new Value(null, hostId));
- Event event = new Event("node_join", nodeid, ccHost + " " + nodeControllerId + " " + NC_DEBUG_PORT);
- NC_DEBUG_PORT++;
+ Event event = new Event("node_join", nodeid, ccHost + " " + nodeControllerId);
return new Pattern(null, 1, null, event);
}
@@ -269,15 +264,4 @@
return new Pattern(null, 1, null, event);
}
- private Pattern createAsterixDeployPattern(String asterixInstanceName, Cluster cluster) {
- Nodeid nodeid = new Nodeid(new Value(null, EventDriver.CLIENT_NODE.getId()));
- String asterixZipName = ManagixDriver.getAsterixZip().substring(
- ManagixDriver.getAsterixZip().lastIndexOf(File.separator) + 1);
- String asterixInstanceZip = ManagixDriver.getAsterixDir() + File.separator + asterixInstanceName
- + File.separator + asterixZipName;
- Event event = new Event("asterix_deploy", nodeid, ManagixDriver.getManagixHome() + " " + asterixInstanceZip
- + " " + cluster.getMasterNode().getIp());
- return new Pattern(null, 1, null, event);
- }
-
}
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
index d1a6485..f020b6d 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
@@ -43,14 +43,13 @@
private State state;
private final String metadataNodeId;
private final String asterixVersion;
- private final String hyracksVersion;
private final List<BackupInfo> backupInfo;
private final String webInterfaceUrl;
private AsterixRuntimeState runtimeState;
private State previousState;
public AsterixInstance(String name, Cluster cluster, Properties configuration, String metadataNodeId,
- String asterixVersion, String hyracksVersion) {
+ String asterixVersion) {
this.name = name;
this.cluster = cluster;
this.configuration = configuration;
@@ -58,7 +57,6 @@
this.state = State.ACTIVE;
this.previousState = State.UNUSABLE;
this.asterixVersion = asterixVersion;
- this.hyracksVersion = hyracksVersion;
this.createdTimestamp = new Date();
this.backupInfo = new ArrayList<BackupInfo>();
this.webInterfaceUrl = "http://" + cluster.getMasterNode().getIp() + ":" + 19001;
@@ -117,10 +115,6 @@
return asterixVersion;
}
- public String getHyracksVersion() {
- return hyracksVersion;
- }
-
public String getDescription(boolean detailed) {
StringBuffer buffer = new StringBuffer();
buffer.append("Name:" + name + "\n");
@@ -142,7 +136,6 @@
if (detailed) {
addDetailedInformation(buffer);
}
- buffer.append("\n");
return buffer.toString();
}
@@ -176,7 +169,6 @@
}
buffer.append("\n");
buffer.append("Asterix version:" + asterixVersion + "\n");
- buffer.append("Hyracks version:" + hyracksVersion + "\n");
buffer.append("Asterix Configuration" + "\n");
for (Entry<Object, Object> entry : configuration.entrySet()) {
buffer.append(entry.getKey() + " = " + entry.getValue() + "\n");
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/service/ZooKeeperService.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/service/ZooKeeperService.java
index 977147e..a35da73 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/service/ZooKeeperService.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/service/ZooKeeperService.java
@@ -23,9 +23,8 @@
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.LinkedBlockingQueue;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.apache.log4j.Logger;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.WatchedEvent;
@@ -34,9 +33,9 @@
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.Stat;
-import edu.uci.ics.asterix.installer.driver.ManagixDriver;
-import edu.uci.ics.asterix.installer.driver.ManagixUtil;
-import edu.uci.ics.asterix.installer.error.ManagixException;
+import edu.uci.ics.asterix.installer.driver.InstallerDriver;
+import edu.uci.ics.asterix.installer.driver.InstallerUtil;
+import edu.uci.ics.asterix.installer.error.InstallerException;
import edu.uci.ics.asterix.installer.model.AsterixInstance;
import edu.uci.ics.asterix.installer.schema.conf.Configuration;
@@ -47,8 +46,8 @@
private static final int ZOOKEEPER_LEADER_CONN_PORT = 2222;
private static final int ZOOKEEPER_LEADER_ELEC_PORT = 2223;
private static final int ZOOKEEPER_SESSION_TIME_OUT = 40 * 1000; //milliseconds
- private static final String ZOOKEEPER_HOME = ManagixDriver.getManagixHome() + File.separator
- + ManagixDriver.MANAGIX_INTERNAL_DIR + File.separator + "zookeeper";
+ private static final String ZOOKEEPER_HOME = InstallerDriver.getManagixHome() + File.separator
+ + InstallerDriver.MANAGIX_INTERNAL_DIR + File.separator + "zookeeper";
private static final String ZOO_KEEPER_CONFIG = ZOOKEEPER_HOME + File.separator + "zk.cfg";
private boolean isRunning = false;
@@ -60,7 +59,6 @@
private ZooKeeperWatcher watcher = new ZooKeeperWatcher(msgQ);
public boolean isRunning(Configuration conf) throws Exception {
- LOGGER.setLevel(Level.WARNING);
List<String> servers = conf.getZookeeper().getServers().getServer();
int clientPort = conf.getZookeeper().getClientPort().intValue();
StringBuffer connectionString = new StringBuffer();
@@ -78,8 +76,8 @@
zk = new ZooKeeper(zkConnectionString, ZOOKEEPER_SESSION_TIME_OUT, watcher);
try {
zk.exists("/dummy", watcher);
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.info("ZooKeeper running at " + connectionString);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("ZooKeeper running at " + connectionString);
}
createRootIfNotExist();
isRunning = true;
@@ -90,7 +88,9 @@
}
public void startService(Configuration conf) throws Exception {
- LOGGER.info("Starting ZooKeeper at " + zkConnectionString);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Starting ZooKeeper at " + zkConnectionString);
+ }
ZookeeperUtil.writeConfiguration(ZOO_KEEPER_CONFIG, conf, ZOOKEEPER_LEADER_CONN_PORT,
ZOOKEEPER_LEADER_ELEC_PORT);
String initScript = ZOOKEEPER_HOME + File.separator + "bin" + File.separator + "zk.init";
@@ -142,7 +142,7 @@
public void removeAsterixInstance(String name) throws Exception {
if (!exists(name)) {
- throw new ManagixException(" Asterix instance by name " + name + " does not exists.");
+ throw new InstallerException("Asterix instance by name " + name + " does not exists.");
}
zk.delete(ASTERIX_INSTANCE_BASE_PATH + File.separator + name, DEFAULT_NODE_VERSION);
}
@@ -214,7 +214,7 @@
buffer.append("server" + "." + serverId + "=" + server + ":" + leaderConnPort + ":" + leaderElecPort + "\n");
serverId++;
}
- ManagixUtil.dumpToFile(zooKeeperConfigPath, buffer.toString());
+ InstallerUtil.dumpToFile(zooKeeperConfigPath, buffer.toString());
}
}
diff --git a/asterix-installer/src/main/resources/clusters/local.xml b/asterix-installer/src/main/resources/clusters/local.xml
index 920d1ab..827b3fa 100644
--- a/asterix-installer/src/main/resources/clusters/local.xml
+++ b/asterix-installer/src/main/resources/clusters/local.xml
@@ -1,12 +1,12 @@
<cluster xmlns="cluster">
<name>local</name>
<workingDir>
- <dir>/tmp/asterix/installer</dir> <!-- a working directory with write permissions>
- <NFS>true</NFS> <!--true if the directory is on NFS and readable by all nodes in the cluster>
+ <dir>/tmp/asterix-installer</dir>
+ <NFS>true</NFS>
</workingDir>
- <logdir>/tmp/asterix/logs</logdir><!-- directory that will house the logs writtern by Asterix processes (CC/NC)-->
- <store>/tmp/asterix/storage</store><!-- storage directory (on each node) that will house the Asterix datasets-->
- <java_home>/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home</java_home>
+ <logdir>/tmp/asterix/logs</logdir>
+ <store>/tmp/asterix/storage</store>
+ <java_home></java_home>
<ram>1024m</ram>
<master-node>
<id>master</id>
diff --git a/asterix-installer/src/main/resources/conf/installer-conf.xml b/asterix-installer/src/main/resources/conf/installer-conf.xml
new file mode 100644
index 0000000..ed3f8a2
--- /dev/null
+++ b/asterix-installer/src/main/resources/conf/installer-conf.xml
@@ -0,0 +1,16 @@
+<configuration xmlns="installer">
+ <backup>
+ <hdfs>
+ <version>0.20.2</version>
+ <url></url>
+ <backupDir></backupDir>
+ </hdfs>
+ </backup>
+ <zookeeper>
+ <homeDir>/tmp/zookeeper</homeDir>
+ <clientPort>2900</clientPort>
+ <servers>
+ <server>localhost</server>
+ </servers>
+ </zookeeper>
+</configuration>
diff --git a/asterix-installer/src/main/resources/conf/log4j.properties b/asterix-installer/src/main/resources/conf/log4j.properties
index 0e340f7..b951c14 100644
--- a/asterix-installer/src/main/resources/conf/log4j.properties
+++ b/asterix-installer/src/main/resources/conf/log4j.properties
@@ -1,60 +1,9 @@
-# Define some default values that can be overridden by system properties
-zookeeper.root.logger=SEVERE, CONSOLE
-zookeeper.console.threshold=WARN
-zookeeper.log.dir=.
-zookeeper.log.file=zookeeper.log
-zookeeper.log.threshold=WARN
-zookeeper.tracelog.dir=.
-zookeeper.tracelog.file=zookeeper_trace.log
+log4j.rootLogger=info, A1
-log4j.logger.edu.uci.ics=INFO
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+# Print the date in ISO 8601 format
+log4j.appender.A1.layout.ConversionPattern=%d %-p: %n%m%n
-#
-# ZooKeeper Logging Configuration
-#
-
-# Format is "<default threshold> (, <appender>)+
-
-# DEFAULT: console appender only
-log4j.rootLogger=WARN
-
-# Example with rolling log file
-#log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE
-
-# Example with rolling log file and tracing
-#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE
-
-#
-# Log INFO level and above messages to the console
-#
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold}
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
-
-#
-# Add ROLLINGFILE to rootLogger to get log file output
-# Log DEBUG level and above messages to a log file
-log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
-log4j.appender.ROLLINGFILE.Threshold=${zookeeper.log.threshold}
-log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/${zookeeper.log.file}
-
-# Max log file size of 10MB
-log4j.appender.ROLLINGFILE.MaxFileSize=10MB
-# uncomment the next line to limit number of backup files
-#log4j.appender.ROLLINGFILE.MaxBackupIndex=10
-
-log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
-
-
-#
-# Add TRACEFILE to rootLogger to get log file output
-# Log DEBUG level and above messages to a log file
-log4j.appender.TRACEFILE=org.apache.log4j.FileAppender
-log4j.appender.TRACEFILE.Threshold=TRACE
-log4j.appender.TRACEFILE.File=${zookeeper.tracelog.dir}/${zookeeper.tracelog.file}
-
-log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout
-### Notice we are including log4j's NDC here (%x)
-log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L][%x] - %m%n
+log4j.logger.edu.uci.ics.asterix.event.management=error
+log4j.logger.org.apache.zookeeper=error
diff --git a/asterix-installer/src/main/resources/conf/managix-conf.xml b/asterix-installer/src/main/resources/conf/managix-conf.xml
deleted file mode 100644
index 9dac8ac..0000000
--- a/asterix-installer/src/main/resources/conf/managix-conf.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<configuration xmlns="managix">
- <backup>
- <hdfs>
- <version>0.20.2</version>
- <url>hdfs://mjcarey-desktop.ics.uci.edu:54310</url>
- <backupDir>/user/raman/asterix_desktop</backupDir>
- </hdfs>
- </backup>
- <zookeeper>
- <homeDir>/Users/ramangrover29/zookeeper</homeDir>
- <clientPort>2900</clientPort>
- <servers>
- <server>localhost</server>
- </servers>
- </zookeeper>
-</configuration>
diff --git a/asterix-installer/src/main/resources/schema/managix-conf.xsd b/asterix-installer/src/main/resources/schema/installer-conf.xsd
similarity index 95%
rename from asterix-installer/src/main/resources/schema/managix-conf.xsd
rename to asterix-installer/src/main/resources/schema/installer-conf.xsd
index b53c089..489b024 100644
--- a/asterix-installer/src/main/resources/schema/managix-conf.xsd
+++ b/asterix-installer/src/main/resources/schema/installer-conf.xsd
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mg="managix" targetNamespace="managix" elementFormDefault="qualified">
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mg="installer" targetNamespace="installer" elementFormDefault="qualified">
<!-- definition of simple types -->
<xs:element name="asterix_home" type="xs:string"/>
diff --git a/asterix-installer/src/main/resources/scripts/managix b/asterix-installer/src/main/resources/scripts/managix
index d788873..cd0794e 100755
--- a/asterix-installer/src/main/resources/scripts/managix
+++ b/asterix-installer/src/main/resources/scripts/managix
@@ -17,4 +17,4 @@
done
MANAGIX_CLASSPATH=$MANAGIX_CLASSPATH:$MANAGIX_HOME/conf/log4j.properties
-java $JAVA_OPTS -Dlog4j.configuration=file:$MANAGIX_HOME/conf/log4j.properties -cp $MANAGIX_CLASSPATH edu.uci.ics.asterix.installer.driver.ManagixDriver $@
+java $JAVA_OPTS -Dlog4j.configuration=file:$MANAGIX_HOME/conf/log4j.properties -cp $MANAGIX_CLASSPATH edu.uci.ics.asterix.installer.driver.InstallerDriver $@
diff --git a/asterix-installer/src/main/resources/scripts/verify.sh b/asterix-installer/src/main/resources/scripts/verify.sh
index fe1bb0c..cac8189 100755
--- a/asterix-installer/src/main/resources/scripts/verify.sh
+++ b/asterix-installer/src/main/resources/scripts/verify.sh
@@ -8,14 +8,14 @@
nc_id=$2
INFO=$(ssh $host "ps -ef | grep nc_join | grep -v grep | grep -v ssh| grep $nc_id" | head -n 1 )
PARENT_ID=`echo $INFO | cut -d " " -f2`
- PID_INFO=$(ssh $host "ps -ef | grep hyracks | grep -v grep | grep -v nc_join | grep $PARENT_ID")
+ PID_INFO=$(ssh $host "ps -ef | grep asterix | grep -v grep | grep -v nc_join | grep $PARENT_ID")
PID=`echo $PID_INFO | cut -d " " -f2`
echo "NC:$host:$nc_id:$PID"
shift 2
done
-CC_PARENT_ID_INFO=$(ssh $MASTER_NODE "ps -ef | grep hyracks | grep cc_start | grep -v ssh")
+CC_PARENT_ID_INFO=$(ssh $MASTER_NODE "ps -ef | grep asterix | grep cc_start | grep -v ssh")
CC_PARENT_ID=`echo $CC_PARENT_ID_INFO | tr -s " " | cut -d " " -f2`
-CC_ID_INFO=$(ssh $MASTER_NODE "ps -ef | grep hyracks | grep $CC_PARENT_ID | grep -v bash")
+CC_ID_INFO=$(ssh $MASTER_NODE "ps -ef | grep asterix | grep $CC_PARENT_ID | grep -v bash")
CC_ID=`echo $CC_ID_INFO | tr -s " " | cut -d " " -f2`
echo "CC:$MASTER_NODE:N/A:$CC_ID"
diff --git a/asterix-installer/src/main/resources/zookeeper/start_zk.sh b/asterix-installer/src/main/resources/zookeeper/start_zk.sh
index c8154bf..033e5f8 100755
--- a/asterix-installer/src/main/resources/zookeeper/start_zk.sh
+++ b/asterix-installer/src/main/resources/zookeeper/start_zk.sh
@@ -2,7 +2,7 @@
ZK_ID=$2
mkdir $ZK_HOME/data
echo $2 > $ZK_HOME/data/myid
-CLASSPATH=$ZK_HOME/lib/zookeeper-3.4.4.jar:$ZK_HOME/lib/log4j-1.2.15.jar:$ZK_HOME/lib/slf4j-api-1.6.1.jar:$ZK_HOME/conf:$ZK_HOME/conf/log4j.properties
+CLASSPATH=$ZK_HOME/lib/zookeeper-3.4.5.jar:$ZK_HOME/lib/log4j-1.2.15.jar:$ZK_HOME/lib/slf4j-api-1.6.1.jar:$ZK_HOME/conf:$ZK_HOME/conf/log4j.properties
ZK_CONF=$ZK_HOME/zk.cfg
export JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8400,server=y,suspend=n"
java $JAVA_OPTS -Dlog4j.configuration="file:$ZK_HOME/conf/log4j.properties" -cp $CLASSPATH org.apache.zookeeper.server.quorum.QuorumPeerMain $ZK_CONF
diff --git a/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml b/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml
index 524727f..269150d 100644
--- a/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml
+++ b/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml
@@ -13,8 +13,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
- <source>1.6</source>
- <target>1.6</target>
+ <source>1.7</source>
+ <target>1.7</target>
</configuration>
</plugin>
</plugins>
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/ARecordType.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/ARecordType.java
index ac1facc..82320e4 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/ARecordType.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/ARecordType.java
@@ -204,8 +204,34 @@
return findFieldPosition(baaos.getByteArray(), 0, baaos.getByteArray().length);
}
+ /**
+ * Returns the field type of the field name if it exists, otherwise null.
+ *
+ * @param fieldName
+ * the fieldName whose type is sought
+ * @return the field type of the field name if it exists, otherwise null
+ * @throws IOException
+ * if an error occurs while serializing the field name
+ */
public IAType getFieldType(String fieldName) throws IOException {
- return fieldTypes[findFieldPosition(fieldName)];
+ int fieldPos = findFieldPosition(fieldName);
+ if (fieldPos < 0 || fieldPos >= fieldTypes.length) {
+ return null;
+ }
+ return fieldTypes[fieldPos];
+ }
+
+ /**
+ * Returns true or false indicating whether or not a field is closed.
+ *
+ * @param fieldName
+ * the name of the field to check
+ * @return true if fieldName is a closed field, otherwise false
+ * @throws IOException
+ * if an error occurs while serializing fieldName
+ */
+ public boolean isClosedField(String fieldName) throws IOException {
+ return findFieldPosition(fieldName) != -1;
}
@Override
diff --git a/asterix-server/pom.xml b/asterix-server/pom.xml
new file mode 100644
index 0000000..e4b8aa6
--- /dev/null
+++ b/asterix-server/pom.xml
@@ -0,0 +1,86 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>asterix-server</artifactId>
+ <name>asterix-server</name>
+ <parent>
+ <groupId>edu.uci.ics.asterix</groupId>
+ <artifactId>asterix</artifactId>
+ <version>0.0.4-SNAPSHOT</version>
+ </parent>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>appassembler-maven-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <configuration>
+ <programs>
+ <program>
+ <mainClass>edu.uci.ics.hyracks.control.cc.CCDriver</mainClass>
+ <name>asterixcc</name>
+ <commandLineArguments>
+ <commandLineArgument>-app-cc-main-class</commandLineArgument>
+ <commandLineArgument>edu.uci.ics.asterix.hyracks.bootstrap.CCApplicationEntryPoint</commandLineArgument>
+ </commandLineArguments>
+ </program>
+ <program>
+ <mainClass>edu.uci.ics.hyracks.control.nc.NCDriver</mainClass>
+ <name>asterixnc</name>
+ <commandLineArguments>
+ <commandLineArgument>-app-nc-main-class</commandLineArgument>
+ <commandLineArgument>edu.uci.ics.asterix.hyracks.bootstrap.NCApplicationEntryPoint</commandLineArgument>
+ </commandLineArguments>
+ </program>
+ </programs>
+ <repositoryLayout>flat</repositoryLayout>
+ <repositoryName>lib</repositoryName>
+ </configuration>
+ <phase>package</phase>
+ <goals>
+ <goal>assemble</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-5</version>
+ <executions>
+ <execution>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/binary-assembly.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>edu.uci.ics.hyracks</groupId>
+ <artifactId>hyracks-control-cc</artifactId>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>edu.uci.ics.hyracks</groupId>
+ <artifactId>hyracks-control-nc</artifactId>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>edu.uci.ics.asterix</groupId>
+ <artifactId>asterix-app</artifactId>
+ <version>0.0.4-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
diff --git a/asterix-server/src/main/assembly/binary-assembly.xml b/asterix-server/src/main/assembly/binary-assembly.xml
new file mode 100644
index 0000000..cd598d9
--- /dev/null
+++ b/asterix-server/src/main/assembly/binary-assembly.xml
@@ -0,0 +1,23 @@
+<assembly>
+ <id>binary-assembly</id>
+ <formats>
+ <format>zip</format>
+ <format>dir</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>target/appassembler/bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <fileMode>0755</fileMode>
+ </fileSet>
+ <fileSet>
+ <directory>target/appassembler/lib</directory>
+ <outputDirectory>lib</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>docs</directory>
+ <outputDirectory>docs</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
diff --git a/pom.xml b/pom.xml
index e13d3c7..592edc5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,9 +84,9 @@
<module>asterix-metadata</module>
<module>asterix-installer</module>
<module>asterix-events</module>
- <module>asterix-dist</module>
<module>asterix-test-framework</module>
- <module>asterix-maven-plugins</module>
+ <module>asterix-maven-plugins</module>
+ <module>asterix-server</module>
</modules>
<repositories>