You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by im...@apache.org on 2015/06/30 08:50:39 UTC

[4/4] incubator-asterixdb git commit: YARN integration for AsterixDB

YARN integration for AsterixDB

This is an initial version of YARN integration for AsterixDB.
- Uses static assignment of CC and NC nodes to NM locations
- Stores state locally on each NM, outside of HDFS
- "All or nothing" container allocation. We don't attempt to
  move or rellocate containers the RM may kill (yet).
- Retains feature parity with managix.

Change-Id: I49c849179d17fc7faa446b9be57a0695df6836ab
Reviewed-on: https://asterix-gerrit.ics.uci.edu/161
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <hu...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/commit/69375a19
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/tree/69375a19
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/diff/69375a19

Branch: refs/heads/master
Commit: 69375a19cc87a7eb553f5399e4c31ecd2c6d44ef
Parents: d8071ee
Author: Ian Maxon <im...@apache.org>
Authored: Mon Jun 29 16:12:53 2015 -0700
Committer: Ian Maxon <im...@apache.org>
Committed: Mon Jun 29 23:48:47 2015 -0700

----------------------------------------------------------------------
 .../api/http/servlet/ShutdownAPIServlet.java    |   65 +
 .../bootstrap/CCApplicationEntryPoint.java      |    2 +
 asterix-common/pom.xml                          |   34 +
 .../src/main/resources/schema/asterix-conf.xsd  |    2 +
 .../src/main/resources/schema/yarn_cluster.xsd  |  103 ++
 asterix-doc/src/site/markdown/yarn.md           |  236 +++
 .../src/site/resources/images/asterix_webui.png |  Bin 0 -> 55418 bytes
 .../src/site/resources/images/running_inst.png  |  Bin 0 -> 90641 bytes
 .../src/site/resources/images/yarn_clust.png    |  Bin 0 -> 61592 bytes
 asterix-doc/src/site/site.xml                   |   34 +-
 asterix-fuzzyjoin/.gitignore                    |    1 +
 .../installer/test/AsterixLifecycleIT.java      |   10 +-
 .../src/main/assembly/binary-assembly.xml       |    1 +
 asterix-yarn/pom.xml                            |  241 +++
 .../src/main/assembly/binary-assembly.xml       |  101 ++
 .../src/main/assembly/hyracks-assembly.xml      |   37 +
 .../edu/uci/ics/asterix/aoya/AConstants.java    |  102 ++
 .../asterix/aoya/AsterixApplicationMaster.java  | 1288 ++++++++++++++++
 .../uci/ics/asterix/aoya/AsterixYARNClient.java | 1387 ++++++++++++++++++
 .../java/edu/uci/ics/asterix/aoya/Deleter.java  |   31 +
 .../edu/uci/ics/asterix/aoya/HDFSBackup.java    |   94 ++
 .../java/edu/uci/ics/asterix/aoya/Utils.java    |  462 ++++++
 .../resources/base-asterix-configuration.xml    |  246 ++++
 .../configs/asterix-client-log4j.properties     |   23 +
 .../configs/base-asterix-configuration.xml      |  246 ++++
 .../src/main/resources/configs/local.xml        |   31 +
 .../configs/my_awesome_cluster_desc.xml         |   23 +
 asterix-yarn/src/main/resources/scripts/asterix |   25 +
 .../src/main/resources/scripts/asterix.cmd      |  103 ++
 .../aoya/test/AsterixYARNInstanceUtil.java      |  107 ++
 .../aoya/test/AsterixYARNLibraryTestIT.java     |   90 ++
 .../aoya/test/AsterixYARNLifecycleIT.java       |  162 ++
 .../uci/ics/asterix/aoya/test/YARNCluster.java  |   99 ++
 .../test/resources/hadoop/conf/core-site.xml    |   29 +
 .../test/resources/hadoop/conf/hdfs-site.xml    |   32 +
 .../test/resources/hadoop/conf/log4j.properties |  108 ++
 .../test/resources/hadoop/conf/mapred-site.xml  |   39 +
 .../typed_adapter/typed_adapter.1.ddl.aql       |   21 +
 .../typed_adapter/typed_adapter.2.update.aql    |   14 +
 .../typed_adapter/typed_adapter.3.query.aql     |   14 +
 .../feed_ingest/feed_ingest.1.ddl.aql           |   35 +
 .../feed_ingest/feed_ingest.2.update.aql        |   14 +
 .../feed_ingest/feed_ingest.3.query.aql         |   13 +
 .../getCapital/getCapital.1.ddl.aql             |    6 +
 .../getCapital/getCapital.2.query.aql           |    5 +
 .../insert-from-select.1.ddl.aql                |    9 +
 .../insert-from-select.2.update.aql             |    6 +
 .../insert-from-select.3.update.aql             |    7 +
 .../insert-from-select.4.query.aql              |    6 +
 .../library-functions/mysum/mysum.1.query.aql   |    4 +
 .../library-functions/toUpper/toUpper.1.ddl.aql |    7 +
 .../toUpper/toUpper.2.query.aql                 |    5 +
 .../dataverseDataset.1.query.aql                |    3 +
 .../functionDataset/functionDataset.1.query.aql |    3 +
 .../libraryDataset/libraryDataset.1.query.aql   |    3 +
 .../typed_adapter/typed_adapter.1.adm           |    6 +
 .../library-feeds/feed_ingest/feed_ingest.1.adm |   13 +
 .../getCapital/getCapital.1.adm                 |    7 +
 .../insert-from-select/insert-from-select.1.adm |    2 +
 .../results/library-functions/mysum/mysum.1.adm |    2 +
 .../library-functions/toUpper/toUpper.1.adm     |    2 +
 .../dataverseDataset/dataverseDataset.1.adm     |    3 +
 .../functionDataset/functionDataset.1.adm       |    9 +
 .../libraryDataset/libraryDataset.1.adm         |    2 +
 .../src/test/resources/library/testsuite.xml    |   56 +
 pom.xml                                         |    3 +-
 66 files changed, 5852 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/ShutdownAPIServlet.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/ShutdownAPIServlet.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/ShutdownAPIServlet.java
new file mode 100644
index 0000000..720592e
--- /dev/null
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/ShutdownAPIServlet.java
@@ -0,0 +1,65 @@
+package edu.uci.ics.asterix.api.http.servlet;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.logging.Level;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.io.IOUtils;
+
+import edu.uci.ics.asterix.api.common.SessionConfig.OutputFormat;
+import edu.uci.ics.asterix.common.config.GlobalConfig;
+import edu.uci.ics.asterix.result.ResultUtils;
+import edu.uci.ics.hyracks.api.client.IHyracksClientConnection;
+
+public class ShutdownAPIServlet extends HttpServlet {
+    private static final long serialVersionUID = 1L;
+
+    private static final String HYRACKS_CONNECTION_ATTR = "edu.uci.ics.asterix.HYRACKS_CONNECTION";
+
+    private static final String HYRACKS_DATASET_ATTR = "edu.uci.ics.asterix.HYRACKS_DATASET";
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
+            IOException {
+
+        response.setContentType("application/json");
+        response.setCharacterEncoding("utf-8");
+
+        PrintWriter out = response.getWriter();
+        OutputFormat format = OutputFormat.JSON;
+        String accept = request.getHeader("Accept");
+        if ((accept == null) || (accept.contains("application/x-adm"))) {
+            format = OutputFormat.ADM;
+        } else if (accept.contains("application/json")) {
+            format = OutputFormat.JSON;
+        }
+        StringWriter sw = new StringWriter();
+        IOUtils.copy(request.getInputStream(), sw, StandardCharsets.UTF_8.name());
+
+        ServletContext context = getServletContext();
+        IHyracksClientConnection hcc;
+        try {
+            synchronized (context) {
+                hcc = (IHyracksClientConnection) context.getAttribute(HYRACKS_CONNECTION_ATTR);
+                response.setStatus(HttpServletResponse.SC_ACCEPTED);
+                hcc.stopCluster();
+            }
+        } catch (Exception e) {
+            GlobalConfig.ASTERIX_LOGGER.log(Level.SEVERE, e.getMessage(), e);
+            ResultUtils.apiErrorHandler(out, e);
+            response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+        }
+    }
+
+    @Override
+    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java b/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
index 6fcc248..a93461d 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
@@ -30,6 +30,7 @@ import edu.uci.ics.asterix.api.http.servlet.FeedServlet;
 import edu.uci.ics.asterix.api.http.servlet.QueryAPIServlet;
 import edu.uci.ics.asterix.api.http.servlet.QueryResultAPIServlet;
 import edu.uci.ics.asterix.api.http.servlet.QueryStatusAPIServlet;
+import edu.uci.ics.asterix.api.http.servlet.ShutdownAPIServlet;
 import edu.uci.ics.asterix.api.http.servlet.UpdateAPIServlet;
 import edu.uci.ics.asterix.common.api.AsterixThreadFactory;
 import edu.uci.ics.asterix.common.config.AsterixExternalProperties;
@@ -162,6 +163,7 @@ public class CCApplicationEntryPoint implements ICCApplicationEntryPoint {
         context.addServlet(new ServletHolder(new DDLAPIServlet()), "/ddl");
         context.addServlet(new ServletHolder(new AQLAPIServlet()), "/aql");
         context.addServlet(new ServletHolder(new ConnectorAPIServlet()), "/connector");
+        context.addServlet(new ServletHolder(new ShutdownAPIServlet()), "/admin/shutdown");
     }
 
     private void setupFeedServer(AsterixExternalProperties externalProperties) throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-common/pom.xml
----------------------------------------------------------------------
diff --git a/asterix-common/pom.xml b/asterix-common/pom.xml
index 70d384b..3afba1e 100644
--- a/asterix-common/pom.xml
+++ b/asterix-common/pom.xml
@@ -110,6 +110,40 @@
 							</bindingIncludes>
 						</configuration>
 					</execution>
+					<execution>
+						<id>yarn_cluster</id>
+						<goals>
+							<goal>generate</goal>
+						</goals>
+						<configuration>
+							<args>
+								<arg>-Xsetters</arg>
+								<arg>-Xvalue-constructor</arg>
+							</args>
+							<plugins>
+								<plugin>
+									<groupId>org.jvnet.jaxb2_commons</groupId>
+									<artifactId>jaxb2-basics</artifactId>
+									<version>0.6.2</version>
+								</plugin>
+								<plugin>
+									<groupId>org.jvnet.jaxb2_commons</groupId>
+									<artifactId>jaxb2-value-constructor</artifactId>
+									<version>3.0</version>
+								</plugin>
+							</plugins>
+							<schemaDirectory>src/main/resources/schema</schemaDirectory>
+							<schemaIncludes>
+								<include>yarn_cluster.xsd</include>
+							</schemaIncludes>
+							<generatePackage>edu.uci.ics.asterix.event.schema.yarnCluster</generatePackage>
+							<generateDirectory>${project.build.directory}/generated-sources/yarn_cluster</generateDirectory>
+							<bindingDirectory>src/main/resources/schema</bindingDirectory>
+							<bindingIncludes>
+								<bindingInclude>jaxb-bindings.xjb</bindingInclude>
+							</bindingIncludes>
+						</configuration>
+					</execution>
 				</executions>
 			</plugin>
 			<plugin>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-common/src/main/resources/schema/asterix-conf.xsd
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/resources/schema/asterix-conf.xsd b/asterix-common/src/main/resources/schema/asterix-conf.xsd
index 3033893..efda4b7 100644
--- a/asterix-common/src/main/resources/schema/asterix-conf.xsd
+++ b/asterix-common/src/main/resources/schema/asterix-conf.xsd
@@ -7,6 +7,7 @@
 
 
 	<xs:element name="instanceName" type="xs:string" />
+	<xs:element name="version" type="xs:string"/>
 	<xs:element name="metadataNode" type="xs:string" />
 	<xs:element name="coredumpPath" type="xs:string" />
 	<xs:element name="storeDirs" type="xs:string" />
@@ -60,6 +61,7 @@
 		<xs:complexType>
 			<xs:sequence>
 				<xs:element ref="mg:instanceName" minOccurs="0" />
+				<xs:element ref="mg:version" minOccurs="0" />
 				<xs:element ref="mg:metadataNode" minOccurs="0" />
 				<xs:element ref="mg:store" maxOccurs="unbounded" />
 				<xs:element ref="mg:coredump" maxOccurs="unbounded" />

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-common/src/main/resources/schema/yarn_cluster.xsd
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/resources/schema/yarn_cluster.xsd b/asterix-common/src/main/resources/schema/yarn_cluster.xsd
new file mode 100644
index 0000000..2aa76cf
--- /dev/null
+++ b/asterix-common/src/main/resources/schema/yarn_cluster.xsd
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	xmlns:cl="yarn_cluster" targetNamespace="yarn_cluster" elementFormDefault="qualified">
+
+	<!-- definition of simple types -->
+	<xs:element name="instance_name" type="xs:string" />
+	<xs:element name="cluster_name" type="xs:string" />
+	<xs:element name="log_dir" type="xs:string" />
+	<xs:element name="txn_log_dir" type="xs:string" />
+	<xs:element name="id" type="xs:string" />
+	<xs:element name="client_ip" type="xs:string" />
+	<xs:element name="cluster_ip" type="xs:string" />
+	<xs:element name="key" type="xs:string" />
+	<xs:element name="value" type="xs:string" />
+	<xs:element name="store" type="xs:string" />
+	<xs:element name="iodevices" type="xs:string" />
+	<xs:element name="web_port" type="xs:string" />
+	<xs:element name="client_port" type="xs:integer" />
+	<xs:element name="cluster_port" type="xs:integer" />
+	<xs:element name="http_port" type="xs:integer" />
+	<xs:element name="debug_port" type="xs:integer" />
+	<xs:element name="metadata_node" type="xs:string" />
+	<xs:element name="cc_container_mem" type="xs:string" />
+	<xs:element name="nc_container_mem" type="xs:string" />
+	
+
+	<!-- definition of complex elements -->
+
+	<xs:element name="master_node">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element ref="cl:id" />
+				<xs:element ref="cl:client_ip" />
+				<xs:element ref="cl:cluster_ip" />
+				<xs:element ref="cl:log_dir" minOccurs="0" />
+				<xs:element ref="cl:client_port" />
+				<xs:element ref="cl:cluster_port" />
+				<xs:element ref="cl:http_port" />
+				<xs:element ref="cl:debug_port" minOccurs="0" />
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="property">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element ref="cl:key" />
+				<xs:element ref="cl:value" />
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="env">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element ref="cl:property" minOccurs="0" maxOccurs="unbounded" />
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="node">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element ref="cl:id" />
+				<xs:element ref="cl:cluster_ip" />
+				<xs:element ref="cl:log_dir" minOccurs="0" />
+				<xs:element ref="cl:txn_log_dir" minOccurs="0" />
+				<xs:element ref="cl:store" minOccurs="0" />
+				<xs:element ref="cl:iodevices" minOccurs="0" />
+				<xs:element ref="cl:debug_port" minOccurs="0" />
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="substitute_nodes">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element ref="cl:node" maxOccurs="unbounded" />
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="cluster">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element ref="cl:instance_name" />
+				<xs:element ref="cl:cluster_name" />
+				<xs:element ref="cl:cc_container_mem" minOccurs="0" />
+				<xs:element ref="cl:nc_container_mem" minOccurs="0" />
+				<xs:element ref="cl:env" minOccurs="0" />
+				<xs:element ref="cl:log_dir" minOccurs="0" />
+				<xs:element ref="cl:txn_log_dir" minOccurs="0" />
+				<xs:element ref="cl:store" minOccurs="0" />
+				<xs:element ref="cl:iodevices" minOccurs="0" />
+				<xs:element ref="cl:metadata_node" />
+				<xs:element ref="cl:master_node" />
+				<xs:element ref="cl:node" maxOccurs="unbounded" />
+				<xs:element ref="cl:substitute_nodes" />
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+
+</xs:schema>     

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-doc/src/site/markdown/yarn.md
----------------------------------------------------------------------
diff --git a/asterix-doc/src/site/markdown/yarn.md b/asterix-doc/src/site/markdown/yarn.md
new file mode 100644
index 0000000..9457754
--- /dev/null
+++ b/asterix-doc/src/site/markdown/yarn.md
@@ -0,0 +1,236 @@
+#Introduction
+
+##<a id="toc">Table of Contents</a>
+* [Architecture Overview](#arch)
+* [Prerequisites](#prereq)
+* [Tutorial Installation](#tut)
+* [FAQ and Common Issues](#faq)
+* [Reference guide to AsterixDB's YARN Client](#detail)
+
+This is a guide describing how to deploy AsterixDB onto a YARN-based environment.
+
+
+##<a id="arch">AsterixDB and the YARN environment</a>
+
+AsterixDB uses a shared-nothing architecture and local file-based storage- not HDFS. Hence we are reliant on the local storage on each node ('iodevices' in AsterixDB ). In YARN there are 3 main types of storage available: 
+
++   HDFS file storage (only suitable for long-lived artifacts, can be slower than local disk)
++   Ephemeral container storage that is cleaned by YARN after a container exits (unsuitable except for transient artifacts)
++   Node-local destinations not managed by YARN, but which are accesable by the container and live beyond its termination.
+
+AsterixDB uses only the last type of storage, which is available with both the DefaultContainerExecutor and LinuxContainerExecutor. However keep in mind that with the DefaultContainerExecutor, the directory must be accessable by the same process that the YARN NodeManager is running as, while with the LinuxContainerExecutor it must be accessable by the unix user who is running the job.
+
+
+##<a id="prereq">Prerequisites</a>
+For this tutorial it will be assumed that we have a YARN cluster with the proper environment variables set. To test this, try running the DistributedShell example that is distributed as part of Apache Hadoop. If that sample application can be run successfully then the environment should be acceptable for launching AsterixDB on to your YARN-enabled cluster.
+
+###Vagrant and Puppet Virtualized cluster for Tutorial
+
+For the purposes of this tutorial, a virtualized cluster that matches all of the tutorial configurations can be found at https://github.com/parshimers/yarn-sample-cluster. It requires a machine with about 4-8GB of RAM to run. To start with this cluster, first clone the repository:
+
+        ↪ git clone https://github.com/parshimers/yarn-sample-cluster.git
+        Cloning into 'yarn-sample-cluster'...
+        remote: Counting objects: 490, done.
+        remote: Compressing objects: 100% (315/315), done.
+        remote: Total 490 (delta 152), reused 490 (delta 152)
+        Receiving objects: 100% (490/490), 521.34 KiB | 201.00 KiB/s, done.
+        Resolving deltas: 100% (152/152), done.
+        Checking connectivity... done.
+
+If the 'hostmanager' plugin for Vagrant isn't already installed, install it like so:
+
+        ↪ vagrant plugin install vagrant-hostmanager
+        Installing the 'vagrant-hostmanager' plugin. This can take a few minutes...
+        Installed the plugin 'vagrant-hostmanager (1.5.0)'!
+
+Then start the tutorial cluster. The hostmanger plugin may ask for sudo at some point, because it updates your hosts file to include the virtual machines.
+
+        ↪ vagrant up
+        Bringing machine 'nc2' up with 'virtualbox' provider...
+        Bringing machine 'nc1' up with 'virtualbox' provider...
+        Bringing machine 'cc' up with 'virtualbox' provider...
+        ...
+
+Once vagrant returns, the environment will be ready. The working directory with the Vagrantfile is also visible to each of the virtual machines (in the /vagrant directory), so we will unzip the Asterix binaries here as well for easy access. The YARN binary can be found on the AsterixDB [downloads page](http://asterixdb.ics.uci.edu/download.html)
+
+    ↪ unzip -d asterix-yarn/ asterix-yarn-binary-assembly.zip
+    ...
+
+To log into the node from which we will run the rest of the tutorial, use 'vagrant ssh' to get to the CC node and move to the YARN client's location:
+
+        ↪ vagrant ssh cc
+        [vagrant@cc ~]$
+        [vagrant@cc ~]$ cd /vagrant/asterix-yarn
+        [vagrant@cc asterix-yarn]$ 
+
+
+#<a id="tut">Tutorial installation</a>
+
+##Configuration
+
+To deploy AsterixDB onto a YARN cluster, we need to construct a configuration file that describes the resources that will be requested from YARN for AsterixDB. 
+
+<div class="source">
+<pre>
+<img src="images/yarn_clust.png" alt="Illustration of a simple YARN cluster with AsterixDB processes."/>
+<em>Fig. 1</em>:  Illustration of a simple YARN cluster with AsterixDB processes and their locations
+</pre>
+</div>
+
+This AsterixDB cluster description file corresponds to the above deployed scenario.
+
+        <cluster xmlns="yarn_cluster">
+            <name>my_awesome_instance</name>
+            <txn_log_dir>/home/yarn/</txn_log_dir>
+            <iodevices>/home/yarn/</iodevices>
+            <store>asterix-data</store>
+            <master_node>
+                <id>cc</id>
+                <client_ip>10.10.0.2</client_ip>
+                <cluster_ip>10.10.0.2</cluster_ip>
+                <client_port>1098</client_port>
+                <cluster_port>1099</cluster_port>
+                <http_port>8888</http_port>
+            </master_node>
+            <node>
+                <id>nc1</id>
+                <cluster_ip>10.10.0.3</cluster_ip>
+            </node>
+            <node>
+                <id>nc2</id>
+                <cluster_ip>10.10.0.4</cluster_ip>
+            </node>
+            <metadata_node>nc1</metadata_node>
+        </cluster>
+
+In this example we have 3 NCs and one CC. Each node is defined by a unique name (not necessarily hostname) and an IP on which AsterixDB nodes will listen and communicate with eachother. This is the 'cluster_ip' parameter. The 'client_ip' parameter is the interface on which client-facing services are presented, for example the web interface. For the next step this file will be saved as 'my_awesome_cluster_desc.xml' in the configs directory.
+
+##Installing and starting the instance
+With this configuration in hand, the YARN client can be used to deploy AsterixDB onto the cluster:
+
+        [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance -c configs/my_awesome_cluster_desc.xml install
+        Waiting for new AsterixDB Instance to start  .
+        Asterix successfully deployed and is now running.
+
+The instance will be visible in the YARN RM similar to the below image
+<div class="source">
+<pre>
+<img src="images/running_inst.png" alt="Illustration of a simple YARN cluster with AsterixDB processes."/>
+<em>Fig. 2</em>:  Hadoop YARN Resource Manager dashboard with running AsterixDB instance
+</pre>
+</div>
+
+Once the client returns success, the instance is now ready to be used. We can now use the asterix instance at the CC's IP (10.10.0.2), on the default port (19001).
+
+
+<div class="source">
+<pre>
+<img src="images/asterix_webui.png" alt="Illustration of a simple YARN cluster with AsterixDB processes." />
+<i>Fig. 3</i>:  AsterixDB Web User Interface
+</pre>
+</div>
+
+From here, to try things out we could run the ADM & AQL 101 tutorial or any other sample workload.
+
+##Stopping the instance
+
+To stop the instance that was just deployed, the `stop` command is used:
+
+        [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance stop
+        Stopping instance my_awesome_instance
+
+This attempts a graceful shutdown of the instance. If for some reason this does not succeed, the `kill` action can be used to force shutdown in a similar fashion:
+
+        [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance kill
+        Are you sure you want to kill this instance? In-progress tasks will be aborted
+        Are you sure you want to do this? (yes/no): yes
+
+
+##Managing stopped instances
+
+After stopping the instance no containers on any YARN NodeManagers are allocated. However, the state of the instance is still persisted on the local disks (and to a lesser extent, HDFS) of each machine where a Node Controller was deployed, in the iodevices and transaction log folders. Every instance, running or not can be viewed via the `describe` action:
+
+        [vagrant@cc asterix-yarn]$ bin/asterix describe
+        Existing AsterixDB instances:
+        Instance my_awesome_instance is stopped
+
+##Starting inactive instances
+
+To start the instance back up once more, the `start` action is used:
+
+        [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance start
+        Waiting for AsterixDB instance to resume .
+        Asterix successfully deployed and is now running.
+
+##Shutting down vagrant
+
+To stop the virtual machines, issue the vagrant halt command from the host machine in the folder containing the Vagrantfile:
+
+        ↪ vagrant halt
+
+
+#<a id="detail">Listing of Commands and Options</a>
+
+##Overview
+
+All commands take the format
+
+        asterix [action-specific option] [action]
+
+###Technical details
+
+AsterixDB's YARN client is based on static allocation of containers within Node Managers based on IP. The AM and CC processes are currently not integrated in any fashion.
+
+The `asterix` command itself is simply a wrapper/launcher around the AsterixClient java class, that provides time-saving default parameters. It is possible to run the client directly with `java -jar` given the correct options as well.
+
+##Actions
+
+Below is a description of the various actions available via the AsterixDB YARN client
+
+| Action      | Description                                                                                                                   |
+|-------------|-------------------------------------------------------------------------------------------------------------------------------|
+| `start`     | Starts an existing instance specified by the -name flag                                                                       |
+| `install`   | Deploys and starts an AsterixDB instance described by the config specified in the -c parameter, and named by the -n parameter |
+| `stop`      | Attempts graceful shutdown of an AsterixDB instance specified in the -name parameter                                          |
+| `kill`      | Forcefully stops an instance by asking YARN to terminate all of its containers.                                               |
+| `destroy`   | Remove the instance specified by -name and all of its stored resources from the cluster                                       |
+| `describe`  | Show all instances, running or not, visible to the AsterixDB YARN client                                                      |
+| `backup`    | Copies the artifacts from a stopped instance to another directory on HDFS so that the instance can be reverted to that state  |
+| `restore`   | Restores an instance to the state saved in a snapshot                                                                         |
+| `lsbackup`  | Lists the stored snapshots from an instance                                                                                   |
+| `rmbackup`  | Removes a snapshot from HDFS                                                                                                  |
+| `libinstall`| Installs an external library or UDF for use in queries                                                                        |
+
+##Options
+Below are all availabe options, and which actions they can be applied to
+
+| Option                      | Long Form       | Short Form | Usage                                                                                        | Applicability                                                                                                                                                                                                                                                                                       |
+|-----------------------------|-----------------|------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Configuration Path          | `-asterixConf`  | `-c`       | ` -c [/path/to/file]`. Path to an AsterixDB Cluster Description File                         | Only required with `create` . A configuration in DFS defines the existance of an instance.                                                                                                                                                                                                          |
+| Instance Name               | `-name`         | `-n`       | `-n [instance name]` Name/Identifier for instance.                                           | Required for all actions except `describe` and `lsbackup`                                                                                                                                                                                                                                           |
+| Asterix Binary Path         | `-asterixTar`   | `-tar`     | `-tar [/path/to/binary]` Path to asterix-server binary.                                      | This is the AsterixDB server binary that is distributed and run on the DFS. Usually set by default via the launcher script and cached for each instance. Can be manually set, only used in `create` and `install` with `-r`                                                                         |
+| Force                       | `-force`        | `-f`       | `-f`. Use at your own risk. Disables any sanity-checking during an action.                   | Can be applied to any action, but is mostly useful in cases where an instance cannot be removed properly via `destroy` and cleanup of DFS files is desired.                                                                                                                                         |
+| Refresh                     | `-refresh`      | `-r`        | `-r`. Replaces cached binary with one mentioned in `-tar`.                                   | This only has an effect with the `start` action. It can be used to replace/upgrade the binary cached for an instance on the DFS.                                                                                                                                                                    |
+| Base Parameters             | `-baseConf`     | `-bc`      | `-bc [path/to/params]`. Specifies parameter file to use during instance creation/alteration. | This file specifies various internal properties of the AsterixDB system, such as Buffer Cache size and Page size, among many others. It can be helpful to tweak parameters in this file, however caution should be exercised in keeping them at sane values. Only used during `alter` and `create`. |
+| External library path       | `-externalLibs` | `-l`       | `-l [path/to/library]`. Specifies an external library to upload to an existing instance.      | Only used in `libinstall`. Specifies the file containing the external function to install                                                                                                                                                                                                           |
+| External library dataverse. | `-libDataverse` | `-ld`      | `-ld [existing dataverse name]`                                                              | Only used in `libinstall`. Specifies the dataverse to install the library in an `-l` option to.                                                                                                                                                                                                     |
+| Snapshot ID                 | `-snapshot`     | [none]     | `-snapshot [backup timestamp/ID]`                                                            | Used with `rmbackup` and `restore` to specify which backup to perform the respective operation on.                                                                                                                                                                                                  |
+
+
+#<a id="faq">Frequently Asked Questions and Common Issues</a>
+
+###Q: Where are the AsterixDB logs located? 
+A: YARN manages the logs for each container. They are visible in the YARN Resource Manager's web interface or through the hadoop command line utilities ( see http://hortonworks.com/blog/simplifying-user-logs-management-and-access-in-yarn/ for more details). 
+
+###Q: Why does AsterixDB fail to start, and the logs contain errors like 'Container is running beyond virtual memory limits.' ?
+
+A: This is a quirk of YARN's memory management that can be observed on certain operating systems (mainly CentOS). It is benign unless it causes problems of this type. A work around is to set `yarn.nodemanager.vmem-check-enabled` to `false` in the yarn-site.xml configuration for Hadoop YARN. This makes the NodeManagers avoid checking the virtual memory entirely and instead rely on resident set size to check memory usage among containers.
+
+###Q: How do I upgrade my existing instance?
+
+A: This is a complex question. Generally, one can use the `refresh` option to upgrade the version of an extant AsterixDB instance. However one must be cautious- we do not guarantee ABI compatability between releases. Therefore extreme caution should be exercised when attempting to upgrade this way!
+
+###Q: Does AsterixDB work on YARN for Windows?
+
+A: In general, yes! It has been done without much real issue. However it is a infrequent use case, so expect the deployment to have some hiccups. We're always listening on the users@asterixdb.incubator.apache.org mailing list for any issues.
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-doc/src/site/resources/images/asterix_webui.png
----------------------------------------------------------------------
diff --git a/asterix-doc/src/site/resources/images/asterix_webui.png b/asterix-doc/src/site/resources/images/asterix_webui.png
new file mode 100644
index 0000000..27522c4
Binary files /dev/null and b/asterix-doc/src/site/resources/images/asterix_webui.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-doc/src/site/resources/images/running_inst.png
----------------------------------------------------------------------
diff --git a/asterix-doc/src/site/resources/images/running_inst.png b/asterix-doc/src/site/resources/images/running_inst.png
new file mode 100644
index 0000000..66eb03a
Binary files /dev/null and b/asterix-doc/src/site/resources/images/running_inst.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-doc/src/site/resources/images/yarn_clust.png
----------------------------------------------------------------------
diff --git a/asterix-doc/src/site/resources/images/yarn_clust.png b/asterix-doc/src/site/resources/images/yarn_clust.png
new file mode 100644
index 0000000..5e386bc
Binary files /dev/null and b/asterix-doc/src/site/resources/images/yarn_clust.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-doc/src/site/site.xml
----------------------------------------------------------------------
diff --git a/asterix-doc/src/site/site.xml b/asterix-doc/src/site/site.xml
index 033f996..3e81a25 100644
--- a/asterix-doc/src/site/site.xml
+++ b/asterix-doc/src/site/site.xml
@@ -21,20 +21,14 @@
   <bannerLeft>
     <name>AsterixDB</name>
     <src>images/asterixlogo.png</src>
-    <href>http://asterixdb.incubator.apache.org/</href>
+    <href>http://asterixdb.ics.uci.edu/</href>
   </bannerLeft>
 
-  <bannerRight>
-      <name>Apache Software Foundation Incubator</name>
-      <src>images/egg-logo.png</src>
-      <href>http://incubator.apache.org/</href>
-  </bannerRight>
-
   <version position="right"/>
 
   <poweredBy>
     <logo name="Hyracks"
-          href="http://asterixdb.incubator.apache.org/"
+          href="https://code.google.com/p/hyracks/"
           img="images/hyrax_ts.png"/>
   </poweredBy>
 
@@ -60,21 +54,25 @@
   </custom>
 
   <body>
+    <head>
+      <script>
+        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');
+      </script>
+    </head>
     <links>
-      <item name="Home" href="index.html"/>
+      <item name="Documentation Home" href="index.html"/>
     </links>
 
-    <menu name="Apache Software Foundation">
-      <item name="Home" href="http://www.apache.org/" />
-      <item name="Donate" href="http://www.apache.org/foundation/sponsorship.html" />
-      <item name="Thanks" href="http://www.apache.org/foundation/thanks.html" />
-      <item name="Security" href="http://www.apache.org/security/" />
-    </menu>
-
-    <menu name="User Documentation">
+    <menu name="Documentation">
       <item name="Installing and Managing AsterixDB using Managix" href="install.html"/>
       <item name="AsterixDB 101: An ADM and AQL Primer" href="aql/primer.html"/>
-      <item name="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)" href="aql/primer-sql-like.html"/>
+       <item name="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)" href="aql/primer-sql-like.html"/>
       <item name="AsterixDB Javascript SDK" href="aql/js-sdk.html"/>
       <item name="Asterix Data Model (ADM)" href="aql/datamodel.html"/>
       <item name="Asterix Query Language (AQL)" href="aql/manual.html"/>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-fuzzyjoin/.gitignore
----------------------------------------------------------------------
diff --git a/asterix-fuzzyjoin/.gitignore b/asterix-fuzzyjoin/.gitignore
index ea8c4bf..29546b5 100644
--- a/asterix-fuzzyjoin/.gitignore
+++ b/asterix-fuzzyjoin/.gitignore
@@ -1 +1,2 @@
 /target
+/target/

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixLifecycleIT.java
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixLifecycleIT.java b/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixLifecycleIT.java
index d2dd016..8793fbe 100644
--- a/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixLifecycleIT.java
+++ b/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixLifecycleIT.java
@@ -24,6 +24,8 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runners.Parameterized.Parameters;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
 
 import edu.uci.ics.asterix.event.error.VerificationUtil;
 import edu.uci.ics.asterix.event.model.AsterixInstance;
@@ -34,6 +36,8 @@ import edu.uci.ics.asterix.installer.command.CommandHandler;
 import edu.uci.ics.asterix.test.aql.TestsUtils;
 import edu.uci.ics.asterix.testframework.context.TestCaseContext;
 
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+
 public class AsterixLifecycleIT {
 
     private static final int NUM_NC = 1;
@@ -69,7 +73,7 @@ public class AsterixLifecycleIT {
     }
 
     @Test
-    public void testStopActiveInstance() throws Exception {
+    public void test_1_StopActiveInstance() throws Exception {
         try {
             AsterixInstallerIntegrationUtil.transformIntoRequiredState(State.ACTIVE);
             String command = "stop -n " + AsterixInstallerIntegrationUtil.ASTERIX_INSTANCE_NAME;
@@ -85,7 +89,7 @@ public class AsterixLifecycleIT {
     }
 
     @Test
-    public void testStartActiveInstance() throws Exception {
+    public void test_2_StartActiveInstance() throws Exception {
         try {
             AsterixInstallerIntegrationUtil.transformIntoRequiredState(State.INACTIVE);
             String command = "start -n " + AsterixInstallerIntegrationUtil.ASTERIX_INSTANCE_NAME;
@@ -101,7 +105,7 @@ public class AsterixLifecycleIT {
     }
 
     @Test
-    public void testDeleteActiveInstance() throws Exception {
+    public void test_3_DeleteActiveInstance() throws Exception {
         try {
             AsterixInstallerIntegrationUtil.transformIntoRequiredState(State.INACTIVE);
             String command = "delete -n " + AsterixInstallerIntegrationUtil.ASTERIX_INSTANCE_NAME;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-tools/src/main/assembly/binary-assembly.xml
----------------------------------------------------------------------
diff --git a/asterix-tools/src/main/assembly/binary-assembly.xml b/asterix-tools/src/main/assembly/binary-assembly.xml
index 0cbdf42..9d26e41 100644
--- a/asterix-tools/src/main/assembly/binary-assembly.xml
+++ b/asterix-tools/src/main/assembly/binary-assembly.xml
@@ -17,6 +17,7 @@
 	<formats>
 		<format>zip</format>
 		<format>dir</format>
+        <format>jar</format>
 	</formats>
 	<includeBaseDirectory>false</includeBaseDirectory>
 	<fileSets>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-yarn/pom.xml
----------------------------------------------------------------------
diff --git a/asterix-yarn/pom.xml b/asterix-yarn/pom.xml
new file mode 100644
index 0000000..e4eb3c6
--- /dev/null
+++ b/asterix-yarn/pom.xml
@@ -0,0 +1,241 @@
+<!--
+ ! Copyright 2009-2013 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.
+ !-->
+<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/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<artifactId>asterix</artifactId>
+		<groupId>edu.uci.ics.asterix</groupId>
+		<version>0.8.7-SNAPSHOT</version>
+	</parent>
+	<artifactId>asterix-yarn</artifactId>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.0.2</version>
+				<configuration>
+					<source>1.7</source>
+					<target>1.7</target>
+					<fork>true</fork>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-jar-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>aoya</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+						<phase>package</phase>
+						<configuration>
+							<classifier>aoya</classifier>
+							<archive>
+								<manifest>
+									<MainClass>edu.uci.ics.asterix.aoya.Client</MainClass>
+								</manifest>
+							</archive>
+							<includes>
+								<include>**/uci/ics/asterix/tools/aoya/*</include>
+							</includes>
+						</configuration>
+					</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>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-failsafe-plugin</artifactId>
+				<version>2.6</version>
+				<configuration>
+					<runOrder>alphabetical</runOrder>
+					<forkMode>pertest</forkMode>
+					<excludes>
+					</excludes>
+					<environmentVariables>
+ 						<JAVA_HOME>${java.home}</JAVA_HOME>
+					</environmentVariables>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>integration-test</goal>
+							<goal>verify</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+	<repositories>
+		<repository>
+			<id>central</id>
+			<url>http://repo1.maven.org/maven2</url>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+		</repository>
+		<repository>
+			<releases>
+				<enabled>true</enabled>
+				<updatePolicy>always</updatePolicy>
+				<checksumPolicy>warn</checksumPolicy>
+			</releases>
+			<snapshots>
+				<enabled>false</enabled>
+				<updatePolicy>never</updatePolicy>
+				<checksumPolicy>fail</checksumPolicy>
+			</snapshots>
+			<id>HDPReleases</id>
+			<name>HDP Releases</name>
+			<url>http://repo.hortonworks.com/content/repositories/releases</url>
+			<layout>default</layout>
+		</repository>
+	</repositories>
+
+	<dependencies>
+		<dependency>
+			<groupId>edu.uci.ics.asterix</groupId>
+			<artifactId>asterix-events</artifactId>
+			<version>0.8.7-SNAPSHOT</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>edu.uci.ics.asterix</groupId>
+			<artifactId>asterix-common</artifactId>
+			<version>0.8.7-SNAPSHOT</version>
+			<type>test-jar</type>
+			<scope>test</scope>
+		</dependency>
+				<dependency>
+			<groupId>edu.uci.ics.asterix</groupId>
+			<artifactId>asterix-test-framework</artifactId>
+			<version>0.8.7-SNAPSHOT</version>
+			<scope>test</scope>
+		</dependency>
+        <dependency>
+            <groupId>edu.uci.ics.asterix</groupId>
+            <artifactId>asterix-common</artifactId>
+            <version>0.8.7-SNAPSHOT</version>
+        </dependency>
+		<dependency>
+			<groupId>org.apache.hadoop</groupId>
+			<artifactId>hadoop-yarn-common</artifactId>
+            <scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.hadoop</groupId>
+			<artifactId>hadoop-yarn-client</artifactId>
+            <scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.hadoop</groupId>
+			<artifactId>hadoop-common</artifactId>
+            <scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+			<version>1.4</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-net</groupId>
+			<artifactId>commons-net</artifactId>
+			<version>3.1</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-lang</groupId>
+			<artifactId>commons-lang</artifactId>
+			<version>2.5</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+			<version>3.2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-configuration</groupId>
+			<artifactId>commons-configuration</artifactId>
+			<version>1.6</version>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-cli</groupId>
+			<artifactId>commons-cli</artifactId>
+			<version>1.2</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-math</artifactId>
+			<version>2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpclient</artifactId>
+			<version>4.2.2</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpcore</artifactId>
+			<version>4.2.2</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>edu.uci.ics.asterix</groupId>
+			<artifactId>asterix-server</artifactId>
+			<version>0.8.7-SNAPSHOT</version>
+			<type>zip</type>
+			<classifier>binary-assembly</classifier>
+		</dependency>
+		<dependency>
+			<groupId>edu.uci.ics.asterix</groupId>
+			<artifactId>asterix-runtime</artifactId>
+			<version>0.8.7-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>edu.uci.ics.asterix</groupId>
+			<artifactId>asterix-app</artifactId>
+			<version>0.8.7-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-simple</artifactId>
+			<version>1.6.1</version>
+		</dependency>
+	</dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-yarn/src/main/assembly/binary-assembly.xml
----------------------------------------------------------------------
diff --git a/asterix-yarn/src/main/assembly/binary-assembly.xml b/asterix-yarn/src/main/assembly/binary-assembly.xml
new file mode 100644
index 0000000..8457c66
--- /dev/null
+++ b/asterix-yarn/src/main/assembly/binary-assembly.xml
@@ -0,0 +1,101 @@
+<!--
+ ! Copyright 2009-2013 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.
+ !-->
+<assembly>
+	<id>binary-assembly</id>
+	<formats>
+        <format>dir</format>
+        <format>zip</format>
+	</formats>
+	<includeBaseDirectory>false</includeBaseDirectory>
+	<fileSets>
+        <fileSet>
+            <directory>src/main/resources/scripts</directory>
+            <fileMode>0755</fileMode>
+            <includes>
+                <include>asterix</include>
+            </includes>
+            <outputDirectory>bin</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources/configs</directory>
+            <fileMode>0755</fileMode>
+            <includes>
+                <include>local.xml</include>
+            </includes>
+            <outputDirectory>configs</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources/</directory>
+            <fileMode>0755</fileMode>
+            <includes>
+                <include>base-asterix-configuration.xml</include>
+            </includes>
+            <outputDirectory>conf</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources/configs</directory>
+            <fileMode>0755</fileMode>
+            <includes>
+                <include>my_awesome_cluster_desc.xml</include>
+            </includes>
+            <outputDirectory>configs</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources/configs</directory>
+            <fileMode>0755</fileMode>
+            <includes>
+                <include>asterix-client-log4j.properties</include>
+            </includes>
+            <outputDirectory>conf</outputDirectory>
+        </fileSet>
+	</fileSets>
+    <dependencySets>
+        <dependencySet>
+            <includes>
+                <include>edu.uci.ics.asterix:asterix-yarn</include>
+                <include>edu.uci.ics.asterix:asterix-common</include>
+                <include>log4j:log4j</include>
+                <include>org.slf4j:slf4j-api</include>
+                <include>org.slf4j:slf4j-simple</include>
+                <include>commons-io:commons-io</include>
+                <include>commons-cli:commons-cli</include>
+                <include>commons-configuration:commons-configuration</include>
+                <include>commons-logging:commons-logging</include>
+                <include>commons-codec:commons-codec</include>
+                <include>commons-lang:commons-lang</include>
+                <include>org.apache.hadoop:hadoop-common</include>
+                <include>org.apache.hadoop:hadoop-hdfs</include>
+                <include>org.apache.hadoop:hadoop-auth</include>
+                <include>org.apache.hadoop:hadoop-yarn-client</include>
+                <include>org.apache.hadoop:hadoop-yarn-common</include>
+                <include>org.apache.hadoop:hadoop-yarn-api</include>
+                <include>org.apache.httpcomponents:httpcore</include>
+                <include>org.apache.httpcomponents:httpclient</include>
+                <include>commons-httpclient:commons-httpclient</include>
+                <include>com.google.guava:guava</include>
+                <include>com.google.protobuf:protobuf-java</include>
+            </includes>
+            <outputDirectory>lib</outputDirectory>
+        </dependencySet>
+        <dependencySet>
+            <outputDirectory>asterix</outputDirectory>
+            <includes>
+                    <include>asterix-server*</include>
+            </includes>
+            <unpack>false</unpack>
+            <useTransitiveDependencies>false</useTransitiveDependencies>
+        </dependencySet>
+    </dependencySets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-yarn/src/main/assembly/hyracks-assembly.xml
----------------------------------------------------------------------
diff --git a/asterix-yarn/src/main/assembly/hyracks-assembly.xml b/asterix-yarn/src/main/assembly/hyracks-assembly.xml
new file mode 100644
index 0000000..ae362ca
--- /dev/null
+++ b/asterix-yarn/src/main/assembly/hyracks-assembly.xml
@@ -0,0 +1,37 @@
+<!--
+ ! Copyright 2009-2013 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.
+ !-->
+<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>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/69375a19/asterix-yarn/src/main/java/edu/uci/ics/asterix/aoya/AConstants.java
----------------------------------------------------------------------
diff --git a/asterix-yarn/src/main/java/edu/uci/ics/asterix/aoya/AConstants.java b/asterix-yarn/src/main/java/edu/uci/ics/asterix/aoya/AConstants.java
new file mode 100644
index 0000000..f8548db
--- /dev/null
+++ b/asterix-yarn/src/main/java/edu/uci/ics/asterix/aoya/AConstants.java
@@ -0,0 +1,102 @@
+package edu.uci.ics.asterix.aoya;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+/**
+ * Constants used in both Client and Application Master
+ */
+@InterfaceAudience.LimitedPrivate(value = { "For simplicity between Client and AM." })
+@InterfaceStability.Unstable
+public class AConstants {
+    /**
+     * Environment key name pointing to the the app master jar location
+     */
+    public static final String APPLICATIONMASTERJARLOCATION = "APPLICATIONMASTERJARLOCATION";
+
+    /**
+     * Environment key name denoting the file timestamp for the the app master jar.
+     * Used to validate the local resource.
+     */
+    public static final String APPLICATIONMASTERJARTIMESTAMP = "APPLICATIONMASTERJARTIMESTAMP";
+
+    /**
+     * Environment key name denoting the file content length for the app master jar.
+     * Used to validate the local resource.
+     */
+    public static final String APPLICATIONMASTERJARLEN = "APPLICATIONMASTERJARLEN";
+    /**
+     * Environment key name pointing to the Asterix distributable tar
+     */
+    public static final String TARLOCATION = "TARLOCATION";
+
+    /**
+     * Environment key name denoting the file timestamp for the Asterix tar.
+     * Used to validate the local resource.
+     */
+    public static final String TARTIMESTAMP = "TARTIMESTAMP";
+
+    /**
+     * Environment key name denoting the file content length for the Asterix tar.
+     * Used to validate the local resource.
+     */
+    public static final String TARLEN = "TARLEN";
+
+    /**
+     * Environment key name pointing to the Asterix cluster configuration file
+     */
+    public static final String CONFLOCATION = "CONFLOCATION";
+
+    /**
+     * Environment key name denoting the file timestamp for the Asterix config.
+     * Used to validate the local resource.
+     */
+
+    public static final String CONFTIMESTAMP = "CONFTIMESTAMP";
+
+    /**
+     * Environment key name denoting the file content length for the Asterix config.
+     * Used to validate the local resource.
+     */
+
+    public static final String CONFLEN = "CONFLEN";
+
+    /**
+     * Environment key name pointing to the Asterix parameters file
+     */
+
+    public static final String PARAMLOCATION = "PARAMLOCATION";
+
+    /**
+     * Environment key name denoting the file timestamp for the Asterix parameters.
+     * Used to validate the local resource.
+     */
+
+    public static final String PARAMTIMESTAMP = "PARAMTIMESTAMP";
+
+    /**
+     * Environment key name denoting the file content length for the Asterix parameters.
+     * Used to validate the local resource.
+     */
+
+    public static final String PARAMLEN = "PARAMLEN";
+
+    public static final String PATHSUFFIX = "PATHSUFFIX";
+
+    public static final String INSTANCESTORE = "INSTANCESTORE";
+
+    public static final String RMADDRESS = "RMADDRESS";
+
+    public static final String RMSCHEDULERADDRESS = "RMSCHEDULERADDRESS";
+
+    public static final String DFS_BASE = "DFSBASE";
+
+    public static final String NC_JAVA_OPTS = "NCJAVAOPTS";
+
+    public static final String CC_JAVA_OPTS = "CCJAVAOPTS";
+
+    public static final String NC_CONTAINER_MEM = "NC_CONTAINER_MEM";
+
+    public static final String CC_CONTAINER_MEM = "CC_CONTAINER_MEM";
+
+}