You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/08/10 04:08:05 UTC

[GitHub] jon-wei closed pull request #6148: [Backport] New quickstart and tutorials

jon-wei closed pull request #6148: [Backport] New quickstart and tutorials
URL: https://github.com/apache/incubator-druid/pull/6148
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/content/toc.md b/docs/content/toc.md
index cfe874548d4..176a1889d16 100644
--- a/docs/content/toc.md
+++ b/docs/content/toc.md
@@ -11,11 +11,19 @@ layout: toc
     * [Query processing](/docs/VERSION/design/index.html#query-processing)
     * [External dependencies](/docs/VERSION/design/index.html#external-dependencies)
     * [Ingestion overview](/docs/VERSION/ingestion/overview.html)
-  * [Quickstart](/docs/VERSION/tutorials/quickstart.html)
-  * [Loading Data](/docs/VERSION/tutorials/ingestion.html)
-    * [Loading from Files](/docs/VERSION/tutorials/tutorial-batch.html)
-    * [Loading from Streams](/docs/VERSION/tutorials/tutorial-streams.html)
-    * [Loading from Kafka](/docs/VERSION/tutorials/tutorial-kafka.html)
+  * [Quickstart](/docs/VERSION/tutorials/index.html)
+    * [Tutorial: Loading a file](/docs/VERSION/tutorials/tutorial-batch.html)
+    * [Tutorial: Loading stream data from Kafka](/docs/VERSION/tutorials/tutorial-kafka.html)
+    * [Tutorial: Loading a file using Hadoop](/docs/VERSION/tutorials/tutorial-batch-hadoop.html)
+    * [Tutorial: Loading stream data using HTTP push](/docs/VERSION/tutorials/tutorial-tranquility.html)
+    * [Tutorial: Querying data](/docs/VERSION/tutorials/tutorial-query.html)
+  * [Further tutorials](/docs/VERSION/tutorials/advanced.html)
+    * [Tutorial: Rollup](/docs/VERSION/tutorials/rollup.html)
+    * [Tutorial: Configuring retention](/docs/VERSION/tutorials/tutorial-retention.html)
+    * [Tutorial: Updating existing data](/docs/VERSION/tutorials/tutorial-update-data.html)
+    * [Tutorial: Compacting segments](/docs/VERSION/tutorials/tutorial-compaction.html)
+    * [Tutorial: Deleting data](/docs/VERSION/tutorials/tutorial-delete-data.html)
+    * [Tutorial: Writing your own ingestion specs](/docs/VERSION/tutorials/tutorial-ingestion-spec.html)
   * [Clustering](/docs/VERSION/tutorials/cluster.html)
 
 ## Data Ingestion
diff --git a/docs/content/tutorials/cluster.md b/docs/content/tutorials/cluster.md
index ac13b594dae..68037d400ac 100644
--- a/docs/content/tutorials/cluster.md
+++ b/docs/content/tutorials/cluster.md
@@ -46,7 +46,7 @@ Very large clusters should consider selecting larger servers.
 
 We recommend running your favorite Linux distribution. You will also need:
 
-  * Java 8 or better
+  * Java 8
 
 Your OS package manager should be able to help for both Java. If your Ubuntu-based OS
 does not have a recent enough version of Java, WebUpd8 offers [packages for those
@@ -291,9 +291,9 @@ rsync -az druid-#{DRUIDVERSION}/ COORDINATION_SERVER:druid-#{DRUIDVERSION}/
 Log on to your coordination server and install Zookeeper:
 
 ```bash
-curl http://www.gtlib.gatech.edu/pub/apache/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz -o zookeeper-3.4.10.tar.gz
-tar -xzf zookeeper-3.4.10.tar.gz
-cd zookeeper-3.4.10
+curl http://www.gtlib.gatech.edu/pub/apache/zookeeper/zookeeper-3.4.11/zookeeper-3.4.11.tar.gz -o zookeeper-3.4.11.tar.gz
+tar -xzf zookeeper-3.4.11.tar.gz
+cd zookeeper-3.4.11
 cp conf/zoo_sample.cfg conf/zoo.cfg
 ./bin/zkServer.sh start
 ```
diff --git a/docs/content/tutorials/img/tutorial-batch-01.png b/docs/content/tutorials/img/tutorial-batch-01.png
new file mode 100644
index 00000000000..6c2fdaa804d
Binary files /dev/null and b/docs/content/tutorials/img/tutorial-batch-01.png differ
diff --git a/docs/content/tutorials/img/tutorial-compaction-01.png b/docs/content/tutorials/img/tutorial-compaction-01.png
new file mode 100644
index 00000000000..1be9d00dbe0
Binary files /dev/null and b/docs/content/tutorials/img/tutorial-compaction-01.png differ
diff --git a/docs/content/tutorials/img/tutorial-compaction-02.png b/docs/content/tutorials/img/tutorial-compaction-02.png
new file mode 100644
index 00000000000..5467635b8b0
Binary files /dev/null and b/docs/content/tutorials/img/tutorial-compaction-02.png differ
diff --git a/docs/content/tutorials/img/tutorial-deletion-01.png b/docs/content/tutorials/img/tutorial-deletion-01.png
new file mode 100644
index 00000000000..d209b8c753c
Binary files /dev/null and b/docs/content/tutorials/img/tutorial-deletion-01.png differ
diff --git a/docs/content/tutorials/img/tutorial-deletion-02.png b/docs/content/tutorials/img/tutorial-deletion-02.png
new file mode 100644
index 00000000000..60959ed1330
Binary files /dev/null and b/docs/content/tutorials/img/tutorial-deletion-02.png differ
diff --git a/docs/content/tutorials/img/tutorial-retention-00.png b/docs/content/tutorials/img/tutorial-retention-00.png
new file mode 100644
index 00000000000..99c4ca8f68e
Binary files /dev/null and b/docs/content/tutorials/img/tutorial-retention-00.png differ
diff --git a/docs/content/tutorials/img/tutorial-retention-01.png b/docs/content/tutorials/img/tutorial-retention-01.png
new file mode 100644
index 00000000000..49589753d4b
Binary files /dev/null and b/docs/content/tutorials/img/tutorial-retention-01.png differ
diff --git a/docs/content/tutorials/img/tutorial-retention-02.png b/docs/content/tutorials/img/tutorial-retention-02.png
new file mode 100644
index 00000000000..a317116b933
Binary files /dev/null and b/docs/content/tutorials/img/tutorial-retention-02.png differ
diff --git a/docs/content/tutorials/img/tutorial-retention-03.png b/docs/content/tutorials/img/tutorial-retention-03.png
new file mode 100644
index 00000000000..614f872a505
Binary files /dev/null and b/docs/content/tutorials/img/tutorial-retention-03.png differ
diff --git a/docs/content/tutorials/index.md b/docs/content/tutorials/index.md
new file mode 100644
index 00000000000..3b9b43d6fca
--- /dev/null
+++ b/docs/content/tutorials/index.md
@@ -0,0 +1,181 @@
+---
+layout: doc_page
+---
+
+# Druid Quickstart
+
+In this quickstart, we will download Druid, set it up on a single machine, load some data, and query the data.
+
+## Prerequisites
+
+You will need:
+
+  * Java 8 or higher
+  * Linux, Mac OS X, or other Unix-like OS (Windows is not supported)
+  * 8G of RAM
+  * 2 vCPUs
+
+On Mac OS X, you can use [Oracle's JDK
+8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) to install
+Java.
+
+On Linux, your OS package manager should be able to help for Java. If your Ubuntu-
+based OS does not have a recent enough version of Java, WebUpd8 offers [packages for those
+OSes](http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html).
+
+## Getting started
+
+To install Druid, issue the following commands in your terminal:
+
+```bash
+curl -O http://static.druid.io/artifacts/releases/druid-#{DRUIDVERSION}-bin.tar.gz
+tar -xzf druid-#{DRUIDVERSION}-bin.tar.gz
+cd druid-#{DRUIDVERSION}
+```
+
+In the package, you should find:
+
+* `LICENSE` - the license files.
+* `bin/` - scripts useful for this quickstart.
+* `conf/*` - template configurations for a clustered setup.
+* `conf-quickstart/*` - configurations for this quickstart.
+* `extensions/*` - all Druid extensions.
+* `hadoop-dependencies/*` - Druid Hadoop dependencies.
+* `lib/*` - all included software packages for core Druid.
+* `quickstart/*` - files useful for this quickstart.
+
+## Download tutorial example files
+
+Before proceeding, please download the [tutorial examples package](../tutorials/tutorial-examples.tar.gz). 
+
+This tarball contains sample data and ingestion specs that will be used in the tutorials. 
+
+```
+curl -O http://druid.io/docs/#{DRUIDVERSION}/tutorials/tutorial-examples.tar.gz
+tar zxvf tutorial-examples.tar.gz
+```
+
+## Start up Zookeeper
+
+Druid currently has a dependency on [Apache ZooKeeper](http://zookeeper.apache.org/) for distributed coordination. You'll
+need to download and run Zookeeper.
+
+```bash
+curl http://www.gtlib.gatech.edu/pub/apache/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz -o zookeeper-3.4.10.tar.gz
+tar -xzf zookeeper-3.4.10.tar.gz
+cd zookeeper-3.4.10
+cp conf/zoo_sample.cfg conf/zoo.cfg
+./bin/zkServer.sh start
+```
+
+## Start up Druid services
+
+With Zookeeper running, return to the druid-#{DRUIDVERSION} directory. In that directory, issue the command:
+
+```bash
+bin/init
+```
+
+This will setup up some directories for you. Next, you can start up the Druid processes in different terminal windows.
+This tutorial runs every Druid process on the same system. In a large distributed production cluster,
+many of these Druid processes can still be co-located together.
+
+```bash
+java `cat examples/conf/druid/coordinator/jvm.config | xargs` -cp "examples/conf/druid/_common:examples/conf/druid/_common/hadoop-xml:examples/conf/druid/coordinator:lib/*" io.druid.cli.Main server coordinator
+java `cat examples/conf/druid/overlord/jvm.config | xargs` -cp "examples/conf/druid/_common:examples/conf/druid/_common/hadoop-xml:examples/conf/druid/overlord:lib/*" io.druid.cli.Main server overlord
+java `cat examples/conf/druid/historical/jvm.config | xargs` -cp "examples/conf/druid/_common:examples/conf/druid/_common/hadoop-xml:examples/conf/druid/historical:lib/*" io.druid.cli.Main server historical
+java `cat examples/conf/druid/middleManager/jvm.config | xargs` -cp "examples/conf/druid/_common:examples/conf/druid/_common/hadoop-xml:examples/conf/druid/middleManager:lib/*" io.druid.cli.Main server middleManager
+java `cat examples/conf/druid/broker/jvm.config | xargs` -cp "examples/conf/druid/_common:examples/conf/druid/_common/hadoop-xml:examples/conf/druid/broker:lib/*" io.druid.cli.Main server broker
+```
+
+Once every service has started, you are now ready to load data.
+
+### Resetting cluster state
+
+All persistent state such as the cluster metadata store and segments for the services will be kept in the `var` directory under the druid-#{DRUIDVERSION} package root. 
+
+Later on, if you'd like to stop the services, CTRL-C to exit from the running java processes. If you
+want a clean start after stopping the services, delete the `log` and `var` directory and run the `init` script again.
+
+From the druid-#{DRUIDVERSION} directory:
+```
+rm -rf log
+rm -rf var
+bin/init
+```
+
+## Loading Data
+
+### Tutorial Dataset
+
+For the following data loading tutorials, we have included a sample data file containing Wikipedia page edit events that occurred on 2015-09-12.
+
+This sample data is located at `quickstart/wikipedia-2015-09-12-sampled.json.gz` from the Druid package root. The page edit events are stored as JSON objects in a text file.
+
+The sample data has the following columns, and an example event is shown below:
+
+  * added
+  * channel
+  * cityName
+  * comment
+  * countryIsoCode
+  * countryName
+  * deleted
+  * delta
+  * isAnonymous
+  * isMinor
+  * isNew
+  * isRobot
+  * isUnpatrolled
+  * metroCode
+  * namespace
+  * page
+  * regionIsoCode
+  * regionName
+  * user
+ 
+```
+{
+  "timestamp":"2015-09-12T20:03:45.018Z",
+  "channel":"#en.wikipedia",
+  "namespace":"Main"
+  "page":"Spider-Man's powers and equipment",
+  "user":"foobar",
+  "comment":"/* Artificial web-shooters */",
+  "cityName":"New York",
+  "regionName":"New York",
+  "regionIsoCode":"NY",
+  "countryName":"United States",
+  "countryIsoCode":"US",
+  "isAnonymous":false,
+  "isNew":false,
+  "isMinor":false,
+  "isRobot":false,
+  "isUnpatrolled":false,
+  "added":99,
+  "delta":99,
+  "deleted":0,
+}
+```
+
+The following tutorials demonstrate various methods of loading data into Druid, including both batch and streaming use cases.
+
+### [Tutorial: Loading a file](./tutorial-batch.html)
+
+This tutorial demonstrates how to perform a batch file load, using Druid's native batch ingestion.
+
+### [Tutorial: Loading stream data from Kafka](../tutorial-kafka.html)
+
+This tutorial demonstrates how to load streaming data from a Kafka topic.
+
+### [Tutorial: Loading a file using Hadoop](../tutorial-batch-hadoop.html)
+
+This tutorial demonstrates how to perform a batch file load, using a remote Hadoop cluster.
+
+### [Tutorial: Loading data using Tranquility](../tutorial-tranquility.html)
+
+This tutorial demonstrates how to load streaming data by pushing events to Druid using the Tranquility service.
+
+### [Tutorial: Writing your own ingestion spec](../tutorial-ingestion-spec.html)
+
+This tutorial demonstrates how to write a new ingestion spec and use it to load data.
\ No newline at end of file
diff --git a/docs/content/tutorials/ingestion.md b/docs/content/tutorials/ingestion.md
deleted file mode 100644
index ab2844fe269..00000000000
--- a/docs/content/tutorials/ingestion.md
+++ /dev/null
@@ -1,42 +0,0 @@
----
-layout: doc_page
----
-
-# Loading Data
-
-## Choosing an ingestion method
-
-Druid supports streaming (real-time) and file-based (batch) ingestion methods. The most 
-popular configurations are:
-
-- [Files](../ingestion/batch-ingestion.html) - Load data from HDFS, S3, local files, or any supported Hadoop 
-filesystem in batches. We recommend this method if your dataset is already in flat files.
-
-- [Stream push](../ingestion/stream-ingestion.html#stream-push) - Push a data stream into Druid in real-time 
-using [Tranquility](http://github.com/druid-io/tranquility), a client library for sending streams 
-to Druid. We recommend this method if your dataset originates in a streaming system like Kafka, 
-Storm, Spark Streaming, or your own system.
-
-- [Stream pull](../ingestion/stream-ingestion.html#stream-pull) - Pull a data stream directly from an external 
-data source into Druid using Realtime Nodes.
-
-## Getting started
-
-The easiest ways to get started with loading your own data are the three included tutorials.
-
-- [Files-based tutorial](tutorial-batch.html) showing you how to load files from your local disk.
-- [Streams-based tutorial](tutorial-streams.html) showing you how to push data over HTTP.
-- [Kafka-based tutorial](tutorial-kafka.html) showing you how to load data from Kafka.
-
-## Hybrid batch/streaming
-
-You can combine batch and streaming methods in a hybrid batch/streaming architecture. In a hybrid architecture, 
-you use a streaming method to do initial ingestion, and then periodically re-ingest older data in batch mode 
-(typically every few hours, or nightly). When Druid re-ingests data for a time range, the new data automatically 
-replaces the data from the earlier ingestion.
-
-All streaming ingestion methods currently supported by Druid do introduce the possibility of dropped or duplicated 
-messages in certain failure scenarios, and batch re-ingestion eliminates this potential source of error for 
-historical data.
-
-Batch re-ingestion also gives you the option to re-ingest your data if you needed to revise it for any reason.
diff --git a/docs/content/tutorials/quickstart.md b/docs/content/tutorials/quickstart.md
deleted file mode 100644
index 4d35b392cc1..00000000000
--- a/docs/content/tutorials/quickstart.md
+++ /dev/null
@@ -1,243 +0,0 @@
----
-layout: doc_page
----
-
-# Druid Quickstart
-
-In this quickstart, we will download Druid, set up it up on a single machine, load some data, and query the data.
-
-## Prerequisites
-
-You will need:
-
-  * Java 8 or higher
-  * Linux, Mac OS X, or other Unix-like OS (Windows is not supported)
-  * 8G of RAM
-  * 2 vCPUs
-
-On Mac OS X, you can use [Oracle's JDK
-8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) to install
-Java.
-
-On Linux, your OS package manager should be able to help for Java. If your Ubuntu-
-based OS does not have a recent enough version of Java, WebUpd8 offers [packages for those
-OSes](http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html).
-
-## Getting started
-
-To install Druid, issue the following commands in your terminal:
-
-```bash
-curl -O http://static.druid.io/artifacts/releases/druid-#{DRUIDVERSION}-bin.tar.gz
-tar -xzf druid-#{DRUIDVERSION}-bin.tar.gz
-cd druid-#{DRUIDVERSION}
-```
-
-In the package, you should find:
-
-* `LICENSE` - the license files.
-* `bin/` - scripts useful for this quickstart.
-* `conf/*` - template configurations for a clustered setup.
-* `conf-quickstart/*` - configurations for this quickstart.
-* `extensions/*` - all Druid extensions.
-* `hadoop-dependencies/*` - Druid Hadoop dependencies.
-* `lib/*` - all included software packages for core Druid.
-* `quickstart/*` - files useful for this quickstart.
-
-## Start up Zookeeper
-
-Druid currently has a dependency on [Apache ZooKeeper](http://zookeeper.apache.org/) for distributed coordination. You'll
-need to download and run Zookeeper.
-
-```bash
-curl http://www.gtlib.gatech.edu/pub/apache/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz -o zookeeper-3.4.10.tar.gz
-tar -xzf zookeeper-3.4.10.tar.gz
-cd zookeeper-3.4.10
-cp conf/zoo_sample.cfg conf/zoo.cfg
-./bin/zkServer.sh start
-```
-
-## Start up Druid services
-
-With Zookeeper running, return to the druid-#{DRUIDVERSION} directory. In that directory, issue the command:
-
-```bash
-bin/init
-```
-
-This will setup up some directories for you. Next, you can start up the Druid processes in different terminal windows.
-This tutorial runs every Druid process on the same system. In a large distributed production cluster,
-many of these Druid processes can still be co-located together.
-
-```bash
-java `cat conf-quickstart/druid/historical/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/historical:lib/*" io.druid.cli.Main server historical
-java `cat conf-quickstart/druid/broker/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/broker:lib/*" io.druid.cli.Main server broker
-java `cat conf-quickstart/druid/coordinator/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/coordinator:lib/*" io.druid.cli.Main server coordinator
-java `cat conf-quickstart/druid/overlord/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/overlord:lib/*" io.druid.cli.Main server overlord
-java `cat conf-quickstart/druid/middleManager/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/middleManager:lib/*" io.druid.cli.Main server middleManager
-```
-
-You should see a log message printed out for each service that starts up.
-
-Later on, if you'd like to stop the services, CTRL-C to exit from the running java processes. If you
-want a clean start after stopping the services, delete the `var` directory and run the `init` script again.
-
-Once every service has started, you are now ready to load data.
-
-## Load batch data
-
-We've included a sample of Wikipedia edits from September 12, 2015 to get you started.
-
-<div class="note info">
-This section shows you how to load data in batches, but you can skip ahead to learn how to <a href="quickstart.html#load-streaming-data">load
-streams in real-time</a>. Druid's streaming ingestion can load data
-with virtually no delay between events occurring and being available for queries.
-</div>
-
-The [dimensions](https://en.wikipedia.org/wiki/Dimension_%28data_warehouse%29) (attributes you can
-filter and split on) in the Wikipedia dataset, other than time, are:
-
-  * channel
-  * cityName
-  * comment
-  * countryIsoCode
-  * countryName
-  * isAnonymous
-  * isMinor
-  * isNew
-  * isRobot
-  * isUnpatrolled
-  * metroCode
-  * namespace
-  * page
-  * regionIsoCode
-  * regionName
-  * user
-
-The [measures](https://en.wikipedia.org/wiki/Measure_%28data_warehouse%29), or *metrics* as they are known in Druid (values you can aggregate)
-in the Wikipedia dataset are:
-
-  * count
-  * added
-  * deleted
-  * delta
-  * user_unique
-
-To load this data into Druid, you can submit an *ingestion task* pointing to the file. We've included
-a task that loads the `wikiticker-2015-09-12-sampled.json` file included in the archive. To submit
-this task, POST it to Druid in a new terminal window from the druid-#{DRUIDVERSION} directory:
-
-```bash
-curl -X 'POST' -H 'Content-Type:application/json' -d @quickstart/wikiticker-index.json localhost:8090/druid/indexer/v1/task
-```
-
-Which will print the ID of the task if the submission was successful:
-
-```bash
-{"task":"index_hadoop_wikipedia_2013-10-09T21:30:32.802Z"}
-```
-
-To view the status of your ingestion task, go to your overlord console:
-[http://localhost:8090/console.html](http://localhost:8090/console.html). You can refresh the console periodically, and after
-the task is successful, you should see a "SUCCESS" status for the task.
-
-After your ingestion task finishes, the data will be loaded by historical nodes and available for
-querying within a minute or two. You can monitor the progress of loading your data in the
-coordinator console, by checking whether there is a datasource "wikiticker" with a blue circle
-indicating "fully available": [http://localhost:8081/#/](http://localhost:8081/#/).
-
-Once the data is fully available, you can immediately query it&mdash; to see how, skip to the [Query
-data](#query-data) section below. Or, continue to the [Load your own data](#load-your-own-data)
-section if you'd like to load a different dataset.
-
-## Load streaming data
-
-To load streaming data, we are going to push events into Druid
-over a simple HTTP API. To do this we will use [Tranquility], a high level data producer
-library for Druid.
-
-To download Tranquility, issue the following commands in your terminal:
-
-```bash
-curl -O http://static.druid.io/tranquility/releases/tranquility-distribution-0.8.0.tgz
-tar -xzf tranquility-distribution-0.8.0.tgz
-cd tranquility-distribution-0.8.0
-```
-
-We've included a configuration file in `conf-quickstart/tranquility/server.json` as part of the Druid distribution
-for a *metrics* datasource. We're going to start the Tranquility server process, which can be used to push events
-directly to Druid.
-
-``` bash
-bin/tranquility server -configFile <path_to_druid_distro>/conf-quickstart/tranquility/server.json
-```
-
-<div class="note info">
-This section shows you how to load data using Tranquility Server, but Druid also supports a wide
-variety of <a href="../ingestion/stream-ingestion.html#stream-push">other streaming ingestion options</a>, including from
-popular streaming systems like Kafka, Storm, Samza, and Spark Streaming.
-</div>
-
-The [dimensions](https://en.wikipedia.org/wiki/Dimension_%28data_warehouse%29) (attributes you can
-filter and split on) for this datasource are flexible. It's configured for *schemaless dimensions*,
-meaning it will accept any field in your JSON input as a dimension.
-
-The metrics (also called
-[measures](https://en.wikipedia.org/wiki/Measure_%28data_warehouse%29); values
-you can aggregate) in this datasource are:
-
-  * count
-  * value_sum (derived from `value` in the input)
-  * value_min (derived from `value` in the input)
-  * value_max (derived from `value` in the input)
-
-We've included a script that can generate some random sample metrics to load into this datasource.
-To use it, simply run in your Druid distribution repository:
-
-```bash
-bin/generate-example-metrics | curl -XPOST -H'Content-Type: application/json' --data-binary @- http://localhost:8200/v1/post/metrics
-```
-
-Which will print something like:
-
-```
-{"result":{"received":25,"sent":25}}
-```
-
-This indicates that the HTTP server received 25 events from you, and sent 25 to Druid. Note that
-this may take a few seconds to finish the first time you run it, as Druid resources must be
-allocated to the ingestion task. Subsequent POSTs should complete quickly.
-
-Once the data is sent to Druid, you can immediately [query it](#query-data).
-
-## Query data
-
-### Direct Druid queries
-
-Druid supports a rich [family of JSON-based
-queries](../querying/querying.html). We've included an example topN query
-in `quickstart/wikiticker-top-pages.json` that will find the most-edited articles in this dataset:
-
-```bash
-curl -L -H'Content-Type: application/json' -XPOST --data-binary @quickstart/wikiticker-top-pages.json http://localhost:8082/druid/v2/?pretty
-```
-
-## Visualizing data
-
-Druid is ideal for power user-facing analytic applications. There are a number of different open source applications to
-visualize and explore data in Druid. We recommend trying [Pivot](https://github.com/implydata/pivot),
-[Superset](https://github.com/airbnb/superset), or [Metabase](https://github.com/metabase/metabase) to start
-visualizing the data you just ingested.
-
-If you installed Pivot for example, you should be able to view your data in your browser at [localhost:9090](http://localhost:9090/).
-
-### SQL and other query libraries
-
-There are many more query tools for Druid than we've included here, including SQL
-engines, and libraries for various languages like Python and Ruby. Please see [the list of
-libraries](../development/libraries.html) for more information.
-
-## Clustered setup
-
-This quickstart sets you up with all services running on a single machine. The next step is to [load
-your own data](ingestion.html). Or, you can skip ahead to [running a distributed cluster](cluster.html).
diff --git a/docs/content/tutorials/tutorial-batch-hadoop.md b/docs/content/tutorials/tutorial-batch-hadoop.md
new file mode 100644
index 00000000000..821f6eac18f
--- /dev/null
+++ b/docs/content/tutorials/tutorial-batch-hadoop.md
@@ -0,0 +1,250 @@
+---
+layout: doc_page
+---
+
+# Tutorial: Load batch data using Hadoop
+
+This tutorial shows you how to load data files into Druid using a remote Hadoop cluster.
+
+For this tutorial, we'll assume that you've already completed the previous [batch ingestion tutorial](tutorial-batch.html) using Druid's native batch ingestion system.
+
+## Install Docker
+
+This tutorial requires [Docker](https://docs.docker.com/install/) to be installed on the tutorial machine.
+
+Once the Docker install is complete, please proceed to the next steps in the tutorial.
+
+## Build the Hadoop docker image
+
+For this tutorial, we've provided a Dockerfile for a Hadoop 2.7.3 cluster, which we'll use to run the batch indexing task.
+
+This Dockerfile and related files are located at `examples/hadoop/docker`.
+
+From the druid-${DRUIDVERSION} package root, run the following commands to build a Docker image named "druid-hadoop-demo" with version tag "2.7.3":
+
+```
+cd examples/hadoop/docker
+docker build -t druid-hadoop-demo:2.7.3 .
+```
+
+This will start building the Hadoop image. Once the image build is done, you should see the message `Successfully tagged druid-hadoop-demo:2.7.3` printed to the console.
+
+## Setup the Hadoop docker cluster
+
+### Create temporary shared directory
+
+We'll need a shared folder between the host and the Hadoop container for transferring some files.
+
+Let's create some folders under `/tmp`, we will use these later when starting the Hadoop container:
+
+```
+mkdir -p /tmp/shared
+mkdir -p /tmp/shared/hadoop-xml
+```
+
+### Configure /etc/hosts
+
+On the host machine, add the following entry to `/etc/hosts`:
+
+```
+127.0.0.1 druid-hadoop-demo
+```
+
+### Start the Hadoop container
+
+Once the `/tmp/shared` folder has been created and the `etc/hosts` entry has been added, run the following command to start the Hadoop container.
+
+```
+docker run -it  -h druid-hadoop-demo -p 50010:50010 -p 50020:50020 -p 50075:50075 -p 50090:50090 -p 8020:8020 -p 10020:10020 -p 19888:19888 -p 8030:8030 -p 8031:8031 -p 8032:8032 -p 8033:8033 -p 8040:8040 -p 8042:8042 -p 8088:8088 -p 8443:8443 -p 2049:2049 -p 9000:9000 -p 49707:49707 -p 2122:2122  -p 34455:34455 -v /tmp/shared:/shared druid-hadoop-demo:2.7.3 /etc/bootstrap.sh -bash
+```
+
+Once the container is started, your terminal will attach to a bash shell running inside the container:
+
+```
+Starting sshd:                                             [  OK  ]
+18/07/26 17:27:15 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
+Starting namenodes on [druid-hadoop-demo]
+druid-hadoop-demo: starting namenode, logging to /usr/local/hadoop/logs/hadoop-root-namenode-druid-hadoop-demo.out
+localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-root-datanode-druid-hadoop-demo.out
+Starting secondary namenodes [0.0.0.0]
+0.0.0.0: starting secondarynamenode, logging to /usr/local/hadoop/logs/hadoop-root-secondarynamenode-druid-hadoop-demo.out
+18/07/26 17:27:31 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
+starting yarn daemons
+starting resourcemanager, logging to /usr/local/hadoop/logs/yarn--resourcemanager-druid-hadoop-demo.out
+localhost: starting nodemanager, logging to /usr/local/hadoop/logs/yarn-root-nodemanager-druid-hadoop-demo.out
+starting historyserver, logging to /usr/local/hadoop/logs/mapred--historyserver-druid-hadoop-demo.out
+bash-4.1#  
+```
+
+The `Unable to load native-hadoop library for your platform... using builtin-java classes where applicable` warning messages can be safely ignored.
+
+### Copy input data to the Hadoop container
+
+From the druid-${DRUIDVERSION} package root on the host, copy the `quickstart/wikiticker-2015-09-12-sampled.json.gz` sample data to the shared folder:
+
+```
+cp quickstart/wikiticker-2015-09-12-sampled.json.gz /tmp/shared/wikiticker-2015-09-12-sampled.json.gz
+```
+
+### Setup HDFS directories
+
+In the Hadoop container's shell, run the following commands to setup the HDFS directories needed by this tutorial and copy the input data to HDFS.
+
+```
+cd /usr/local/hadoop/bin
+./hadoop fs -mkdir /druid
+./hadoop fs -mkdir /druid/segments
+./hadoop fs -mkdir /quickstart
+./hadoop fs -chmod 777 /druid
+./hadoop fs -chmod 777 /druid/segments
+./hadoop fs -chmod 777 /quickstart
+./hadoop fs -chmod -R 777 /tmp
+./hadoop fs -chmod -R 777 /user
+./hadoop fs -put /shared/wikiticker-2015-09-12-sampled.json.gz /quickstart/wikiticker-2015-09-12-sampled.json.gz
+```
+
+If you encounter namenode errors such as `mkdir: Cannot create directory /druid. Name node is in safe mode.` when running this command, the Hadoop container is not finished initializing. When this occurs, wait a couple of minutes and retry the commands.
+
+## Configure Druid to use Hadoop
+
+Some additional steps are needed to configure the Druid cluster for Hadoop batch indexing.
+
+### Copy Hadoop configuration to Druid classpath
+
+From the Hadoop container's shell, run the following command to copy the Hadoop .xml configuration files to the shared folder:
+
+```
+cp /usr/local/hadoop/etc/hadoop/*.xml /shared/hadoop-xml
+```
+
+From the host machine, run the following, where {PATH_TO_DRUID} is replaced by the path to the Druid package.
+
+```
+cp /tmp/shared/hadoop-xml/*.xml {PATH_TO_DRUID}/examples/conf/druid/_common/hadoop-xml/
+```
+
+### Update Druid segment and log storage
+
+In your favorite text editor, open `examples/conf/druid/_common/common.runtime.properties`, and make the following edits:
+
+#### Disable local deep storage and enable HDFS deep stroage
+
+```
+#
+# Deep storage
+#
+
+# For local disk (only viable in a cluster if this is a network mount):
+#druid.storage.type=local
+#druid.storage.storageDirectory=var/druid/segments
+
+# For HDFS:
+druid.storage.type=hdfs
+druid.storage.storageDirectory=/druid/segments
+```
+
+
+#### Disable local log storage and enable HDFS log storage
+
+```
+#
+# Indexing service logs
+#
+
+# For local disk (only viable in a cluster if this is a network mount):
+#druid.indexer.logs.type=file
+#druid.indexer.logs.directory=var/druid/indexing-logs
+
+# For HDFS:
+druid.indexer.logs.type=hdfs
+druid.indexer.logs.directory=/druid/indexing-logs
+
+```
+
+### Restart Druid cluster
+
+Once the Hadoop .xml files have been copied to the Druid cluster and the segment/log storage configuration has been updated to use HDFS, the Druid cluster needs to be restarted for the new configurations to take effect.
+
+If the cluster is still running, CTRL-C to terminate each Druid service, and re-run them.
+
+## Load batch data
+
+We've included a sample of Wikipedia edits from September 12, 2015 to get you started.
+
+To load this data into Druid, you can submit an *ingestion task* pointing to the file. We've included
+a task that loads the `wikiticker-2015-09-12-sampled.json.gz` file included in the archive. To submit
+this task, POST it to Druid in a new terminal window from the druid-#{DRUIDVERSION} directory:
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/wikipedia-index-hadoop.json http://localhost:8090/druid/indexer/v1/task
+```
+
+Which will print the ID of the task if the submission was successful:
+
+```bash
+{"task":"index_hadoop_wikipedia-hadoop_2018-06-09T21:30:32.802Z"}
+```
+
+To view the status of your ingestion task, go to your overlord console:
+[http://localhost:8090/console.html](http://localhost:8090/console.html). You can refresh the console periodically, and after
+the task is successful, you should see a "SUCCESS" status for the task.
+
+After your ingestion task finishes, the data will be loaded by historical nodes and be available for
+querying within a minute or two. You can monitor the progress of loading your data in the
+coordinator console, by checking whether there is a datasource "wikipedia" with a blue circle
+indicating "fully available": [http://localhost:8081/#/](http://localhost:8081/#/).
+
+![Coordinator console](../tutorials/img/tutorial-batch-01.png "Wikipedia 100% loaded")
+
+## Querying your data
+
+Your data should become fully available within a minute or two after the task completes. You can monitor this process on 
+your Coordinator console at [http://localhost:8081/#/](http://localhost:8081/#/).
+
+Please follow the [query tutorial](../tutorial/tutorial-query.html) to run some example queries on the newly loaded data.
+
+## Cleanup
+
+This tutorial is only meant to be used together with the [query tutorial](../tutorial/tutorial-query.html). 
+
+If you wish to go through any of the other tutorials, you will need to:
+* Shut down the cluster and reset the cluster state by following the [reset instructions](index.html#resetting-the-cluster).
+* Revert the deep storage and task storage config back to local types in `examples/conf/druid/_common/common.runtime.properties`
+* Restart the cluster
+
+This is necessary because the other ingestion tutorials will write to the same "wikipedia" datasource, and later tutorials expect the cluster to use local deep storage.
+
+Example reverted config:
+
+```
+#
+# Deep storage
+#
+
+# For local disk (only viable in a cluster if this is a network mount):
+druid.storage.type=local
+druid.storage.storageDirectory=var/druid/segments
+
+# For HDFS:
+#druid.storage.type=hdfs
+#druid.storage.storageDirectory=/druid/segments
+
+#
+# Indexing service logs
+#
+
+# For local disk (only viable in a cluster if this is a network mount):
+druid.indexer.logs.type=file
+druid.indexer.logs.directory=var/druid/indexing-logs
+
+# For HDFS:
+#druid.indexer.logs.type=hdfs
+#druid.indexer.logs.directory=/druid/indexing-logs
+
+```
+
+
+## Further reading
+
+For more information on loading batch data with Hadoop, please see [the Hadoop batch ingestion documentation](../ingestion/hadoop.html).
+
diff --git a/docs/content/tutorials/tutorial-batch.md b/docs/content/tutorials/tutorial-batch.md
index 3d14a9a8449..2aaf058924a 100644
--- a/docs/content/tutorials/tutorial-batch.md
+++ b/docs/content/tutorials/tutorial-batch.md
@@ -2,137 +2,130 @@
 layout: doc_page
 ---
 
-# Tutorial: Load your own batch data
+# Tutorial: Loading a file
 
 ## Getting started
 
-This tutorial shows you how to load your own data files into Druid.
+This tutorial demonstrates how to perform a batch file load, using Druid's native batch ingestion.
 
 For this tutorial, we'll assume you've already downloaded Druid as described in 
-the [single-machine quickstart](quickstart.html) and have it running on your local machine. You 
+the [single-machine quickstart](index.html) and have it running on your local machine. You 
 don't need to have loaded any data yet.
 
-Once that's complete, you can load your own dataset by writing a custom ingestion spec.
+## Preparing the data and the ingestion task spec
 
-## Writing an ingestion spec
+A data load is initiated by submitting an *ingestion task* spec to the Druid overlord. For this tutorial, we'll be loading the sample Wikipedia page edits data.
 
-When loading files into Druid, you will use Druid's [batch loading](../ingestion/batch-ingestion.html) process.
-There's an example batch ingestion spec in `quickstart/wikiticker-index.json` that you can modify 
-for your own needs.
+We have provided an ingestion spec at `examples/wikipedia-index.json`, shown here for convenience,
+which has been configured to read the `quickstart/wikiticker-2015-09-12-sampled.json.gz` input file:
 
-The most important questions are:
-
-  * What should the dataset be called? This is the "dataSource" field of the "dataSchema".
-  * Where is the dataset located? The file paths belong in the "paths" of the "inputSpec". If you 
-want to load multiple files, you can provide them as a comma-separated string.
-  * Which field should be treated as a timestamp? This belongs in the "column" of the "timestampSpec".
-  * Which fields should be treated as dimensions? This belongs in the "dimensions" of the "dimensionsSpec".
-  * Which fields should be treated as metrics? This belongs in the "metricsSpec".
-  * What time ranges (intervals) are being loaded? This belongs in the "intervals" of the "granularitySpec".
-
-If your data does not have a natural sense of time, you can tag each row with the current time. 
-You can also tag all rows with a fixed timestamp, like "2000-01-01T00:00:00.000Z".
-
-Let's use this pageviews dataset as an example. Druid supports TSV, CSV, and JSON out of the box. 
-Note that nested JSON objects are not supported, so if you do use JSON, you should provide a file 
-containing flattened objects.
-
-```json
-{"time": "2015-09-01T00:00:00Z", "url": "/foo/bar", "user": "alice", "latencyMs": 32}
-{"time": "2015-09-01T01:00:00Z", "url": "/", "user": "bob", "latencyMs": 11}
-{"time": "2015-09-01T01:30:00Z", "url": "/foo/bar", "user": "bob", "latencyMs": 45}
 ```
-
-Make sure the file has no newline at the end. If you save this to a file called "pageviews.json", then for this dataset:
-
-  * Let's call the dataset "pageviews".
-  * The data is located in "pageviews.json".
-  * The timestamp is the "time" field.
-  * Good choices for dimensions are the string fields "url" and "user".
-  * Good choices for metrics are a count of pageviews, and the sum of "latencyMs". Collecting that 
-sum when we load the data will allow us to compute an average at query time as well.
-  * The data covers the time range 2015-09-01 (inclusive) through 2015-09-02 (exclusive).
-
-You can copy the existing `quickstart/wikiticker-index.json` indexing task to a new file:
-
-```bash
-cp quickstart/wikiticker-index.json my-index-task.json
-```
-
-And modify it by altering these sections:
-
-```json
-"dataSource": "pageviews"
-```
-
-```json
-"inputSpec": {
-  "type": "static",
-  "paths": "pageviews.json"
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "wikipedia",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "channel",
+              "cityName",
+              "comment",
+              "countryIsoCode",
+              "countryName",
+              "isAnonymous",
+              "isMinor",
+              "isNew",
+              "isRobot",
+              "isUnpatrolled",
+              "metroCode",
+              "namespace",
+              "page",
+              "regionIsoCode",
+              "regionName",
+              "user",
+              { "name": "added", "type": "long" },
+              { "name": "deleted", "type": "long" },
+              { "name": "delta", "type": "long" }
+            ]
+          },
+          "timestampSpec": {
+            "column": "time",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "day",
+        "queryGranularity" : "none",
+        "intervals" : ["2015-09-12/2015-09-13"],
+        "rollup" : false
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "quickstart/",
+        "filter" : "wikiticker-2015-09-12-sampled.json.gz"
+      },
+      "appendToExisting" : false
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
 }
 ```
 
-```json
-"timestampSpec": {
-  "format": "auto",
-  "column": "time"
-}
-```
-
-```json
-"dimensionsSpec": {
-  "dimensions": ["url", "user"]
-}
-```
-
-```json
-"metricsSpec": [
-  {"name": "views", "type": "count"},
-  {"name": "latencyMs", "type": "doubleSum", "fieldName": "latencyMs"}
-]
-```
-
-```json
-"granularitySpec": {
-  "type": "uniform",
-  "segmentGranularity": "day",
-  "queryGranularity": "none",
-  "intervals": ["2015-09-01/2015-09-02"]
-}
-```
+This spec will create a datasource named "wikipedia".
 
-## Running the task
+## Load batch data
 
-To actually run this task, first make sure that the indexing task can read *pageviews.json*:
+We've included a sample of Wikipedia edits from September 12, 2015 to get you started.
 
-- If you're running locally (no configuration for connecting to Hadoop; this is the default) then 
-place it in the root of the Druid distribution.
-- If you configured Druid to connect to a Hadoop cluster, upload 
-the pageviews.json file to HDFS. You may need to adjust the `paths` in the ingestion spec.
-
-To kick off the indexing process, POST your indexing task to the Druid Overlord. In a standard Druid 
-install, the URL is `http://OVERLORD_IP:8090/druid/indexer/v1/task`.
+To load this data into Druid, you can submit an *ingestion task* pointing to the file. To submit
+this task, POST it to Druid in a new terminal window from the druid-#{DRUIDVERSION} directory:
 
 ```bash
-curl -X 'POST' -H 'Content-Type:application/json' -d @my-index-task.json OVERLORD_IP:8090/druid/indexer/v1/task
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/wikipedia-index.json http://localhost:8090/druid/indexer/v1/task
 ```
 
-If you're running everything on a single machine, you can use localhost:
+Which will print the ID of the task if the submission was successful:
 
 ```bash
-curl -X 'POST' -H 'Content-Type:application/json' -d @my-index-task.json localhost:8090/druid/indexer/v1/task
+{"task":"index_wikipedia_2018-06-09T21:30:32.802Z"}
 ```
 
-If anything goes wrong with this task (e.g. it finishes with status FAILED), you can troubleshoot 
-by visiting the "Task log" on the [overlord console](http://localhost:8090/console.html).
+To view the status of your ingestion task, go to your overlord console:
+[http://localhost:8090/console.html](http://localhost:8090/console.html). You can refresh the console periodically, and after
+the task is successful, you should see a "SUCCESS" status for the task.
+
+After your ingestion task finishes, the data will be loaded by historical nodes and available for
+querying within a minute or two. You can monitor the progress of loading your data in the
+coordinator console, by checking whether there is a datasource "wikipedia" with a blue circle
+indicating "fully available": [http://localhost:8081/#/](http://localhost:8081/#/).
+
+![Coordinator console](../tutorials/img/tutorial-batch-01.png "Wikipedia 100% loaded")
 
 ## Querying your data
 
 Your data should become fully available within a minute or two. You can monitor this process on 
 your Coordinator console at [http://localhost:8081/#/](http://localhost:8081/#/).
 
-Once your data is fully available, you can query it using any of the 
-[supported query methods](../querying/querying.html).
+Once the data is loaded, please follow the [query tutorial](../tutorial/tutorial-query.html) to run some example queries on the newly loaded data.
+
+## Cleanup
+
+If you wish to go through any of the other ingestion tutorials, you will need to reset the cluster and follow these [reset instructions](index.html#resetting-the-cluster), as the other tutorials will write to the same "wikipedia" datasource.
 
 ## Further reading
 
diff --git a/docs/content/tutorials/tutorial-compaction.md b/docs/content/tutorials/tutorial-compaction.md
new file mode 100644
index 00000000000..73c182a73e0
--- /dev/null
+++ b/docs/content/tutorials/tutorial-compaction.md
@@ -0,0 +1,103 @@
+---
+layout: doc_page
+---
+
+# Tutorial: Compacting segments
+
+This tutorial demonstrates how to compact existing segments into fewer but larger segments.
+
+Because there is some per-segment memory and processing overhead, it can sometimes be beneficial to reduce the total number of segments.
+
+For this tutorial, we'll assume you've already downloaded Druid as described in 
+the [single-machine quickstart](index.html) and have it running on your local machine. 
+
+It will also be helpful to have finished [Tutorial: Loading a file](/docs/VERSION/tutorials/tutorial-batch.html) and [Tutorial: Querying data](/docs/VERSION/tutorials/tutorial-query.html).
+
+## Load the initial data
+
+For this tutorial, we'll be using the Wikipedia edits sample data, with an ingestion task spec that will create a separate segment for each hour in the input data.
+
+The ingestion spec can be found at `examples/compaction-init-index.json`. Let's submit that spec, which will create a datasource called `compaction-tutorial`:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/compaction-init-index.json http://localhost:8090/druid/indexer/v1/task
+```
+
+After the ingestion completes, go to http://localhost:8081/#/datasources/compaction-tutorial in a browser to view information about the new datasource in the Coordinator console.
+
+There will be 24 segments for this datasource, one segment per hour in the input data:
+
+![Original segments](../tutorials/img/tutorial-retention-01.png "Original segments")
+
+Running a COUNT(*) query on this datasource shows that there are 39,244 rows:
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/compaction-count-sql.json http://localhost:8082/druid/v2/sql
+```
+
+```
+[{"EXPR$0":39244}]
+```
+
+## Compact the data
+
+Let's now combine these 24 segments into one segment.
+
+We have included a compaction task spec for this tutorial datasource at `examples/compaction-final-index.json`:
+
+```
+{
+  "type": "compact",
+  "dataSource": "compaction-tutorial",
+  "interval": "2015-09-12/2015-09-13",
+  "tuningConfig" : {
+    "type" : "index",
+    "targetPartitionSize" : 5000000,
+    "maxRowsInMemory" : 25000,
+    "forceExtendableShardSpecs" : true
+  }
+}
+```
+
+This will compact all segments for the interval `2015-09-12/2015-09-13` in the `compaction-tutorial` datasource. 
+
+The parameters in the `tuningConfig` control how many segments will be present in the compacted set of segments. 
+
+In this tutorial example, only one compacted segment will be created, as the 39244 rows in the input is less than the 5000000 `targetPartitionSize`.
+
+Let's submit this task now:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/compaction-final-index.json http://localhost:8090/druid/indexer/v1/task
+```
+
+After the task finishes, refresh the http://localhost:8081/#/datasources/compaction-tutorial page.
+
+The original 24 segments will eventually be marked as "unused" by the Coordinator and removed, with the new compacted segment remaining. 
+
+By default, the Druid coordinator will not mark segments as unused until the coordinator process has been up for at least 15 minutes, so you may see the old segment set and the new compacted set at the same time in the coordinator, e.g.:
+
+![Compacted segments intermediate state](../tutorials/img/tutorial-compaction-01.png "Compacted segments intermediate state")
+
+The new compacted segment has a more recent version than the original segments, so even when both sets of segments are shown by the coordinator, queries will only read from the new compacted segment.
+
+Let's try running a COUNT(*) on `compaction-tutorial` again, where the row count should still be 39,244:
+
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/compaction-count-sql.json http://localhost:8082/druid/v2/sql
+```
+
+```
+[{"EXPR$0":39244}]
+```
+
+After the coordinator has been running for at least 15 minutes, the http://localhost:8081/#/datasources/compaction-tutorial page should show there is only 1 segment:
+
+![Compacted segments final state](../tutorials/img/tutorial-compaction-02.png "Compacted segments final state")
+
+## Further reading
+
+[Task documentation](../ingestion/tasks.html)
+
+[Segment optimization](../operations/segment-optimization.html)
diff --git a/docs/content/tutorials/tutorial-delete-data.md b/docs/content/tutorials/tutorial-delete-data.md
new file mode 100644
index 00000000000..19f0b57ded6
--- /dev/null
+++ b/docs/content/tutorials/tutorial-delete-data.md
@@ -0,0 +1,156 @@
+---
+layout: doc_page
+---
+
+# Tutorial: Deleting data
+
+This tutorial demonstrates how to delete existing data.
+
+For this tutorial, we'll assume you've already downloaded Druid as described in 
+the [single-machine quickstart](index.html) and have it running on your local machine. 
+
+Completing [Tutorial: Configuring retention](/docs/VERSION/tutorials/tutorial-retention.html) first is highly recommended, as we will be using retention rules in this tutorial.
+
+## Load initial data
+
+In this tutorial, we will use the Wikipedia edits data, with an indexing spec that creates hourly segments. This spec is located at `examples/deletion-index.json`, and it creates a datasource called `deletion-tutorial`.
+
+Let's load this initial data:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/deletion-index.json http://localhost:8090/druid/indexer/v1/task
+```
+
+When the load finishes, open http://localhost:8081/#/datasources/deletion-tutorial in a browser.
+
+## How to permanently delete data
+
+Permanent deletion of a Druid segment has two steps:
+
+1. The segment must first be marked as "unused". This occurs when a segment is dropped by retention rules, and when a user manually disables a segment through the Coordinator API. This tutorial will cover both cases.
+2. After segments have been marked as "unused", a Kill Task will delete any "unused" segments from Druid's metadata store as well as deep storage.
+
+Let's drop some segments now, first with load rules, then manually.
+
+## Drop some data with load rules
+
+As with the previous retention tutorial, there are currently 24 segments in the `deletion-tutorial` datasource.
+
+Click the `edit rules` button with a pencil icon at the upper left corner of the page.
+
+A rule configuration window will appear. Enter `tutorial` for both the user and changelog comment field.
+
+Now click the `+ Add a rule` button twice. 
+
+In the `rule #1` box at the top, click `Load`, `Interval`, enter `2015-09-12T12:00:00.000Z/2015-09-13T00:00:00.000Z` in the interval box, and click `+ _default_tier replicant`.
+
+In the `rule #2` box at the bottom, click `Drop` and `Forever`.
+
+This will cause the first 12 segments of `deletion-tutorial` to be dropped. However, these dropped segments are not removed from deep storage.
+
+You can see that all 24 segments are still present in deep storage by listing the contents of `druid-{DRUIDVERSION}/var/druid/segments/deletion-tutorial`:
+
+```
+$ ls -l1 var/druid/segments/deletion-tutorial/
+2015-09-12T00:00:00.000Z_2015-09-12T01:00:00.000Z
+2015-09-12T01:00:00.000Z_2015-09-12T02:00:00.000Z
+2015-09-12T02:00:00.000Z_2015-09-12T03:00:00.000Z
+2015-09-12T03:00:00.000Z_2015-09-12T04:00:00.000Z
+2015-09-12T04:00:00.000Z_2015-09-12T05:00:00.000Z
+2015-09-12T05:00:00.000Z_2015-09-12T06:00:00.000Z
+2015-09-12T06:00:00.000Z_2015-09-12T07:00:00.000Z
+2015-09-12T07:00:00.000Z_2015-09-12T08:00:00.000Z
+2015-09-12T08:00:00.000Z_2015-09-12T09:00:00.000Z
+2015-09-12T09:00:00.000Z_2015-09-12T10:00:00.000Z
+2015-09-12T10:00:00.000Z_2015-09-12T11:00:00.000Z
+2015-09-12T11:00:00.000Z_2015-09-12T12:00:00.000Z
+2015-09-12T12:00:00.000Z_2015-09-12T13:00:00.000Z
+2015-09-12T13:00:00.000Z_2015-09-12T14:00:00.000Z
+2015-09-12T14:00:00.000Z_2015-09-12T15:00:00.000Z
+2015-09-12T15:00:00.000Z_2015-09-12T16:00:00.000Z
+2015-09-12T16:00:00.000Z_2015-09-12T17:00:00.000Z
+2015-09-12T17:00:00.000Z_2015-09-12T18:00:00.000Z
+2015-09-12T18:00:00.000Z_2015-09-12T19:00:00.000Z
+2015-09-12T19:00:00.000Z_2015-09-12T20:00:00.000Z
+2015-09-12T20:00:00.000Z_2015-09-12T21:00:00.000Z
+2015-09-12T21:00:00.000Z_2015-09-12T22:00:00.000Z
+2015-09-12T22:00:00.000Z_2015-09-12T23:00:00.000Z
+2015-09-12T23:00:00.000Z_2015-09-13T00:00:00.000Z
+```
+
+## Manually disable a segment
+
+Let's manually disable a segment now. This will mark a segment as "unused", but not remove it from deep storage.
+
+On http://localhost:8081/#/datasources/deletion-tutorial, click one of the remaining segments on the left for full details about the segment:
+
+![Segments](../tutorials/img/tutorial-deletion-01.png "Segments")
+
+The top of the info box shows the full segment ID, e.g. `deletion-tutorial_2016-06-27T14:00:00.000Z_2016-06-27T15:00:00.000Z_2018-07-27T22:57:00.110Z` for the segment of hour 14.
+
+Let's disable the hour 14 segment by sending the following DELETE request to the coordinator, where {SEGMENT-ID} is the full segment ID shown in the info box:
+
+```
+curl -XDELETE http://localhost:8081/druid/coordinator/v1/datasources/deletion-tutorial/segments/{SEGMENT-ID}
+```
+
+After that command completes, you should see that the segment for hour 14 has been disabled:
+
+![Segments 2](../tutorials/img/tutorial-deletion-02.png "Segments 2")
+
+Note that the hour 14 segment is still in deep storage:
+
+```
+$ ls -l1 var/druid/segments/deletion-tutorial/
+2015-09-12T00:00:00.000Z_2015-09-12T01:00:00.000Z
+2015-09-12T01:00:00.000Z_2015-09-12T02:00:00.000Z
+2015-09-12T02:00:00.000Z_2015-09-12T03:00:00.000Z
+2015-09-12T03:00:00.000Z_2015-09-12T04:00:00.000Z
+2015-09-12T04:00:00.000Z_2015-09-12T05:00:00.000Z
+2015-09-12T05:00:00.000Z_2015-09-12T06:00:00.000Z
+2015-09-12T06:00:00.000Z_2015-09-12T07:00:00.000Z
+2015-09-12T07:00:00.000Z_2015-09-12T08:00:00.000Z
+2015-09-12T08:00:00.000Z_2015-09-12T09:00:00.000Z
+2015-09-12T09:00:00.000Z_2015-09-12T10:00:00.000Z
+2015-09-12T10:00:00.000Z_2015-09-12T11:00:00.000Z
+2015-09-12T11:00:00.000Z_2015-09-12T12:00:00.000Z
+2015-09-12T12:00:00.000Z_2015-09-12T13:00:00.000Z
+2015-09-12T13:00:00.000Z_2015-09-12T14:00:00.000Z
+2015-09-12T14:00:00.000Z_2015-09-12T15:00:00.000Z
+2015-09-12T15:00:00.000Z_2015-09-12T16:00:00.000Z
+2015-09-12T16:00:00.000Z_2015-09-12T17:00:00.000Z
+2015-09-12T17:00:00.000Z_2015-09-12T18:00:00.000Z
+2015-09-12T18:00:00.000Z_2015-09-12T19:00:00.000Z
+2015-09-12T19:00:00.000Z_2015-09-12T20:00:00.000Z
+2015-09-12T20:00:00.000Z_2015-09-12T21:00:00.000Z
+2015-09-12T21:00:00.000Z_2015-09-12T22:00:00.000Z
+2015-09-12T22:00:00.000Z_2015-09-12T23:00:00.000Z
+2015-09-12T23:00:00.000Z_2015-09-13T00:00:00.000Z
+```
+
+## Run a kill task
+
+Now that we have disabled some segments, we can submit a Kill Task, which will delete the disabled segments from metadata and deep storage.
+
+A Kill Task spec has been provided at `examples/deletion-kill.json`. Submit this task to the Overlord with the following command:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/deletion-kill.json http://localhost:8090/druid/indexer/v1/task
+```
+
+After this task completes, you can see that the disabled segments have now been removed from deep storage:
+
+```
+$ ls -l1 var/druid/segments/deletion-tutorial/
+2015-09-12T12:00:00.000Z_2015-09-12T13:00:00.000Z
+2015-09-12T13:00:00.000Z_2015-09-12T14:00:00.000Z
+2015-09-12T15:00:00.000Z_2015-09-12T16:00:00.000Z
+2015-09-12T16:00:00.000Z_2015-09-12T17:00:00.000Z
+2015-09-12T17:00:00.000Z_2015-09-12T18:00:00.000Z
+2015-09-12T18:00:00.000Z_2015-09-12T19:00:00.000Z
+2015-09-12T19:00:00.000Z_2015-09-12T20:00:00.000Z
+2015-09-12T20:00:00.000Z_2015-09-12T21:00:00.000Z
+2015-09-12T21:00:00.000Z_2015-09-12T22:00:00.000Z
+2015-09-12T22:00:00.000Z_2015-09-12T23:00:00.000Z
+2015-09-12T23:00:00.000Z_2015-09-13T00:00:00.000Z
+```
\ No newline at end of file
diff --git a/docs/content/tutorials/tutorial-examples.tar.gz b/docs/content/tutorials/tutorial-examples.tar.gz
new file mode 100644
index 00000000000..cdd20c1abf6
Binary files /dev/null and b/docs/content/tutorials/tutorial-examples.tar.gz differ
diff --git a/docs/content/tutorials/tutorial-ingestion-spec.md b/docs/content/tutorials/tutorial-ingestion-spec.md
new file mode 100644
index 00000000000..65a028291bb
--- /dev/null
+++ b/docs/content/tutorials/tutorial-ingestion-spec.md
@@ -0,0 +1,691 @@
+---
+layout: doc_page
+---
+
+# Tutorial: Writing an ingestion spec
+
+This tutorial will guide the reader through the process of defining an ingestion spec, pointing out key considerations and guidelines.
+
+For this tutorial, we'll assume you've already downloaded Druid as described in 
+the [single-machine quickstart](index.html) and have it running on your local machine. 
+
+It will also be helpful to have finished [Tutorial: Loading a file](/docs/VERSION/tutorials/tutorial-batch.html), [Tutorial: Querying data](/docs/VERSION/tutorials/tutorial-query.html), and [Tutorial: Rollup](/docs/VERSION/tutorials/tutorial-rollup.html).
+
+## Example data
+
+Suppose we have the following network flow data:
+
+* `srcIP`: IP address of sender
+* `srcPort`: Port of sender
+* `dstIP`: IP address of receiver
+* `dstPort`: Port of receiver
+* `protocol`: IP protocol number
+* `packets`: number of packets transmitted
+* `bytes`: number of bytes transmitted
+* `cost`: the cost of sending the traffic
+
+```
+{"ts":"2018-01-01T01:01:35Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2", "srcPort":2000, "dstPort":3000, "protocol": 6, "packets":10, "bytes":1000, "cost": 1.4}
+{"ts":"2018-01-01T01:01:51Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2", "srcPort":2000, "dstPort":3000, "protocol": 6, "packets":20, "bytes":2000, "cost": 3.1}
+{"ts":"2018-01-01T01:01:59Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2", "srcPort":2000, "dstPort":3000, "protocol": 6, "packets":30, "bytes":3000, "cost": 0.4}
+{"ts":"2018-01-01T01:02:14Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2", "srcPort":5000, "dstPort":7000, "protocol": 6, "packets":40, "bytes":4000, "cost": 7.9}
+{"ts":"2018-01-01T01:02:29Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2", "srcPort":5000, "dstPort":7000, "protocol": 6, "packets":50, "bytes":5000, "cost": 10.2}
+{"ts":"2018-01-01T01:03:29Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2", "srcPort":5000, "dstPort":7000, "protocol": 6, "packets":60, "bytes":6000, "cost": 4.3}
+{"ts":"2018-01-01T02:33:14Z","srcIP":"7.7.7.7", "dstIP":"8.8.8.8", "srcPort":4000, "dstPort":5000, "protocol": 17, "packets":100, "bytes":10000, "cost": 22.4}
+{"ts":"2018-01-01T02:33:45Z","srcIP":"7.7.7.7", "dstIP":"8.8.8.8", "srcPort":4000, "dstPort":5000, "protocol": 17, "packets":200, "bytes":20000, "cost": 34.5}
+{"ts":"2018-01-01T02:35:45Z","srcIP":"7.7.7.7", "dstIP":"8.8.8.8", "srcPort":4000, "dstPort":5000, "protocol": 17, "packets":300, "bytes":30000, "cost": 46.3}
+```
+
+Save the JSON contents above into a file called `ingestion-tutorial-data.json` under `examples`.
+
+Let's walk through the process of defining an ingestion spec that can load this data. 
+
+For this tutorial, we will be using the native batch indexing task. When using other task types, some aspects of the ingestion spec will differ, and this tutorial will point out such areas.
+
+## Defining the schema
+
+The core element of a Druid ingestion spec is the `dataSchema`. The `dataSchema` defines how to parse input data into a set of columns that will be stored in Druid.
+
+Let's start with an empty `dataSchema` and add fields to it as we progress through the tutorial.
+
+Create a new file called `ingestion-tutorial-index.json` under `examples` with the following contents:
+
+```json
+"dataSchema" : {}
+```
+
+We will be making successive edits to this ingestion spec as we progress through the tutorial.
+
+### Datasource name
+
+The datasource name is specified by the `dataSource` parameter in the `dataSchema`.
+
+```json
+"dataSchema" : {
+  "dataSource" : "ingestion-tutorial",
+}
+```
+
+Let's call the tutorial datasource `ingestion-tutorial`.
+
+### Choose a parser
+
+A `dataSchema` has a `parser` field, which defines the parser that Druid will use to interpret the input data.
+
+Since our input data is represented as JSON strings, we'll use a `string` parser with `json` format:
+
+```
+"dataSchema" : {
+  "dataSource" : "ingestion-tutorial",
+  "parser" : {
+    "type" : "string",
+    "parseSpec" : {
+      "format" : "json"
+    }
+  }
+}
+```
+
+### Time column
+
+The `parser` needs to know how to extract the main timestamp field from the input data. When using a `json` type `parseSpec`, the timestamp is defined in a `timestampSpec`. 
+
+The timestamp column in our input data is named "ts", containing ISO 8601 timestamps, so let's add a `timestampSpec` with that information to the `parseSpec`:
+
+```
+"dataSchema" : {
+  "dataSource" : "ingestion-tutorial",
+  "parser" : {
+    "type" : "string",
+    "parseSpec" : {
+      "format" : "json",
+      "timestampSpec" : {
+        "format" : "iso",
+        "column" : "ts"
+      }
+    }
+  }
+}
+```
+
+### Column types
+
+Now that we've defined the time column, let's look at definitions for other columns.
+
+Druid supports the following column types: String, Long, Float, Double. We will see how these are used in the following sections.
+
+Before we move on to how we define our other non-time columns, let's discuss `rollup` first.
+
+### Rollup
+
+When ingesting data, we must consider whether we wish to use rollup or not.
+
+* If rollup is enabled, we will need to separate the input columns into two categories, "dimensions" and "metrics". "Dimensions" are the grouping columns for rollup, while "metrics" are the columns that will be aggregated.
+
+* If rollup is disabled, then all columns are treated as "dimensions" and no pre-aggregation occurs.
+
+For this tutorial, let's enable rollup. This is specified with a `granularitySpec` on the `dataSchema`. 
+
+Note that the `granularitySpec` lies outside of the `parser`. We will revist the `parser` soon when we define our dimensions and metrics.
+
+```
+"dataSchema" : {
+  "dataSource" : "ingestion-tutorial",
+  "parser" : {
+    "type" : "string",
+    "parseSpec" : {
+      "format" : "json",
+      "timestampSpec" : {
+        "format" : "iso",
+        "column" : "ts"
+      }
+    }
+  },
+  "granularitySpec" : {
+    "rollup" : true
+  }
+}
+
+```
+
+#### Choosing dimensions and metrics
+
+For this example dataset, the following is a sensible split for "dimensions" and "metrics":
+
+* Dimensions: srcIP, srcPort, dstIP, dstPort, protocol
+* Metrics: packets, bytes, cost
+
+The dimensions here are a group of properties that identify a unidirectional flow of IP traffic, while the metrics represent facts about the IP traffic flow specified by a dimension grouping.
+
+Let's look at how to define these dimensions and metrics within the ingestion spec.
+
+#### Dimensions
+
+Dimensions are specified with a `dimensionsSpec` inside the `parseSpec`.
+
+```
+"dataSchema" : {
+  "dataSource" : "ingestion-tutorial",
+  "parser" : {
+    "type" : "string",
+    "parseSpec" : {
+      "format" : "json",
+      "timestampSpec" : {
+        "format" : "iso",
+        "column" : "ts"
+      },
+      "dimensionsSpec" : {
+        "dimensions": [
+          "srcIP",
+          { "name" : "srcPort", "type" : "long" },
+          { "name" : "dstIP", "type" : "string" },
+          { "name" : "dstPort", "type" : "long" },
+          { "name" : "protocol", "type" : "string" }
+        ]
+      }
+    }
+  },
+  "granularitySpec" : {
+    "rollup" : true
+  }
+}
+```
+
+Each dimension has a `name` and a `type`, where `type` can be "long", "float", "double", or "string".
+
+Note that `srcIP` is a "string" dimension; for string dimensions, it is enough to specify just a dimension name, since "string" is the default dimension type.
+
+Also note that `protocol` is a numeric value in the input data, but we are ingesting it as a "string" column; Druid will coerce the input longs to strings during ingestion.
+ 
+##### Strings vs. Numerics
+
+Should a numeric input be ingested as a numeric dimension or as a string dimension?
+
+Numeric dimensions have the following pros/cons relative to String dimensions:
+* Pros: Numeric representation can result in smaller column sizes on disk and lower processing overhead when reading values from the column
+* Cons: Numeric dimensions do not have indices, so filtering on them will often be slower than filtering on an equivalent String dimension (which has bitmap indices)
+
+#### Metrics
+
+Metrics are specified with a `metricsSpec` inside the `dataSchema`:
+
+```json
+"dataSchema" : {
+  "dataSource" : "ingestion-tutorial",
+  "parser" : {
+    "type" : "string",
+    "parseSpec" : {
+      "format" : "json",
+      "timestampSpec" : {
+        "format" : "iso",
+        "column" : "ts"
+      },
+      "dimensionsSpec" : {
+        "dimensions": [
+          "srcIP",
+          { "name" : "srcPort", "type" : "long" },
+          { "name" : "dstIP", "type" : "string" },
+          { "name" : "dstPort", "type" : "long" },
+          { "name" : "protocol", "type" : "string" }
+        ]
+      }   
+    }
+  },
+  "metricsSpec" : [
+    { "type" : "count", "name" : "count" },
+    { "type" : "longSum", "name" : "packets", "fieldName" : "packets" },
+    { "type" : "longSum", "name" : "bytes", "fieldName" : "bytes" },
+    { "type" : "doubleSum", "name" : "cost", "fieldName" : "cost" }
+  ],
+  "granularitySpec" : {
+    "rollup" : true
+  }
+}
+```
+
+When defining a metric, it is necessary to specify what type of aggregation should be performed on that column during rollup.
+
+Here we have defined long sum aggregations on the two long metric columns, `packets` and `bytes`, and a double sum aggregation for the `cost` column.
+
+Note that the `metricsSpec` is on a different nesting level than `dimensionSpec` or `parseSpec`; it belongs on the same nesting level as `parser` within the `dataSchema`.
+
+Note that we have also defined a `count` aggregator. The count aggregator will track how many rows in the original input data contributed to a "rolled up" row in the final ingested data.
+
+### No rollup
+
+If we were not using rollup, all columns would be specified in the `dimensionsSpec`, e.g.:
+
+```
+      "dimensionsSpec" : {
+        "dimensions": [
+          "srcIP",
+          { "name" : "srcPort", "type" : "long" },
+          { "name" : "dstIP", "type" : "string" },
+          { "name" : "dstPort", "type" : "long" },
+          { "name" : "protocol", "type" : "string" },
+          { "name" : "packets", "type" : "long" },
+          { "name" : "bytes", "type" : "long" },
+          { "name" : "srcPort", "type" : "double" }
+        ]
+      },
+```
+
+
+### Define granularities
+
+At this point, we are done defining the `parser` and `metricsSpec` within the `dataSchema` and we are almost done writing the ingestion spec.
+
+There are some additional properties we need to set in the `granularitySpec`:
+* Type of granularitySpec: `uniform` and `arbitrary` are the two supported types. For this tutorial, we will use a `uniform` granularity spec, where all segments have uniform interval sizes (for example, all segments cover an hour's worth of data).
+* The segment granularity: what size of time interval should a single segment contain data for? e.g., `DAY`, `WEEK`
+* The bucketing granularity of the timestamps in the time column (referred to as `queryGranularity`)
+
+#### Segment granularity
+
+Segment granularity is configured by the `segmentGranularity` property in the `granularitySpec`. For this tutorial, we'll create hourly segments:
+
+```
+"dataSchema" : {
+  "dataSource" : "ingestion-tutorial",
+  "parser" : {
+    "type" : "string",
+    "parseSpec" : {
+      "format" : "json",
+      "timestampSpec" : {
+        "format" : "iso",
+        "column" : "ts"
+      },
+      "dimensionsSpec" : {
+        "dimensions": [
+          "srcIP",
+          { "name" : "srcPort", "type" : "long" },
+          { "name" : "dstIP", "type" : "string" },
+          { "name" : "dstPort", "type" : "long" },
+          { "name" : "protocol", "type" : "string" }
+        ]
+      }      
+    }
+  },
+  "metricsSpec" : [
+    { "type" : "count", "name" : "count" },
+    { "type" : "longSum", "name" : "packets", "fieldName" : "packets" },
+    { "type" : "longSum", "name" : "bytes", "fieldName" : "bytes" },
+    { "type" : "doubleSum", "name" : "cost", "fieldName" : "cost" }
+  ],
+  "granularitySpec" : {
+    "type" : "uniform",
+    "segmentGranularity" : "HOUR",
+    "rollup" : true
+  }
+}
+```
+
+Our input data has events from two separate hours, so this task will generate two segments.
+
+#### Query granularity
+
+The query granularity is configured by the `queryGranularity` property in the `granularitySpec`. For this tutorial, let's use minute granularity:
+
+```
+"dataSchema" : {
+  "dataSource" : "ingestion-tutorial",
+  "parser" : {
+    "type" : "string",
+    "parseSpec" : {
+      "format" : "json",
+      "timestampSpec" : {
+        "format" : "iso",
+        "column" : "ts"
+      },
+      "dimensionsSpec" : {
+        "dimensions": [
+          "srcIP",
+          { "name" : "srcPort", "type" : "long" },
+          { "name" : "dstIP", "type" : "string" },
+          { "name" : "dstPort", "type" : "long" },
+          { "name" : "protocol", "type" : "string" }
+        ]
+      }      
+    }
+  },
+  "metricsSpec" : [
+    { "type" : "count", "name" : "count" },
+    { "type" : "longSum", "name" : "packets", "fieldName" : "packets" },
+    { "type" : "longSum", "name" : "bytes", "fieldName" : "bytes" },
+    { "type" : "doubleSum", "name" : "cost", "fieldName" : "cost" }
+  ],
+  "granularitySpec" : {
+    "type" : "uniform",
+    "segmentGranularity" : "HOUR",
+    "queryGranularity" : "MINUTE"
+    "rollup" : true
+  }
+}
+```
+
+To see the effect of the query granularity, let's look at this row from the raw input data:
+
+```
+{"ts":"2018-01-01T01:03:29Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2", "srcPort":5000, "dstPort":7000, "protocol": 6, "packets":60, "bytes":6000, "cost": 4.3}
+```
+
+When this row is ingested with minute queryGranularity, Druid will floor the row's timestamp to minute buckets:
+
+```
+{"ts":"2018-01-01T01:03:00Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2", "srcPort":5000, "dstPort":7000, "protocol": 6, "packets":60, "bytes":6000, "cost": 4.3}
+```
+
+#### Define an interval (batch only)
+
+For batch tasks, it is necessary to define a time interval. Input rows with timestamps outside of the time interval will not be ingested.
+
+The interval is also specified in the `granularitySpec`:
+
+```
+"dataSchema" : {
+  "dataSource" : "ingestion-tutorial",
+  "parser" : {
+    "type" : "string",
+    "parseSpec" : {
+      "format" : "json",
+      "timestampSpec" : {
+        "format" : "iso",
+        "column" : "ts"
+      },
+      "dimensionsSpec" : {
+        "dimensions": [
+          "srcIP",
+          { "name" : "srcPort", "type" : "long" },
+          { "name" : "dstIP", "type" : "string" },
+          { "name" : "dstPort", "type" : "long" },
+          { "name" : "protocol", "type" : "string" }
+        ]
+      }      
+    }
+  },
+  "metricsSpec" : [
+    { "type" : "count", "name" : "count" },
+    { "type" : "longSum", "name" : "packets", "fieldName" : "packets" },
+    { "type" : "longSum", "name" : "bytes", "fieldName" : "bytes" },
+    { "type" : "doubleSum", "name" : "cost", "fieldName" : "cost" }
+  ],
+  "granularitySpec" : {
+    "type" : "uniform",
+    "segmentGranularity" : "HOUR",
+    "queryGranularity" : "MINUTE",
+    "intervals" : ["2018-01-01/2018-01-02"],
+    "rollup" : true
+  }
+}
+```
+
+## Define the task type
+
+We've now finished defining our `dataSchema`. The remaining steps are to place the `dataSchema` we created into an ingestion task spec, and specify the input source.
+
+The `dataSchema` is shared across all task types, but each task type has its own specification format. For this tutorial, we will use the native batch ingestion task:
+
+```
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "ingestion-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "timestampSpec" : {
+            "format" : "iso",
+            "column" : "ts"
+          },
+          "dimensionsSpec" : {
+            "dimensions": [
+              "srcIP",
+              { "name" : "srcPort", "type" : "long" },
+              { "name" : "dstIP", "type" : "string" },
+              { "name" : "dstPort", "type" : "long" },
+              { "name" : "protocol", "type" : "string" }
+            ]              
+          }      
+        }
+      },
+      "metricsSpec" : [
+        { "type" : "count", "name" : "count" },
+        { "type" : "longSum", "name" : "packets", "fieldName" : "packets" },
+        { "type" : "longSum", "name" : "bytes", "fieldName" : "bytes" },
+        { "type" : "doubleSum", "name" : "cost", "fieldName" : "cost" }
+      ],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "HOUR",
+        "queryGranularity" : "MINUTE",
+        "intervals" : ["2018-01-01/2018-01-02"],
+        "rollup" : true
+      }
+    }
+  }
+}
+```
+
+## Define the input source
+
+Now let's define our input source, which is specified in an `ioConfig` object. Each task type has its own type of `ioConfig`. The native batch task uses "firehoses" to read input data, so let's configure a "local" firehose to read the example netflow data we saved earlier:
+
+
+```
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "examples/",
+        "filter" : "ingestion-tutorial-data.json"
+      }
+    }
+```
+
+```
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "ingestion-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "timestampSpec" : {
+            "format" : "iso",
+            "column" : "ts"
+          },
+          "dimensionsSpec" : {
+            "dimensions": [
+              "srcIP",
+              { "name" : "srcPort", "type" : "long" },
+              { "name" : "dstIP", "type" : "string" },
+              { "name" : "dstPort", "type" : "long" },
+              { "name" : "protocol", "type" : "string" }
+            ]
+          }      
+        }
+      },
+      "metricsSpec" : [
+        { "type" : "count", "name" : "count" },
+        { "type" : "longSum", "name" : "packets", "fieldName" : "packets" },
+        { "type" : "longSum", "name" : "bytes", "fieldName" : "bytes" },
+        { "type" : "doubleSum", "name" : "cost", "fieldName" : "cost" }
+      ],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "HOUR",
+        "queryGranularity" : "MINUTE",
+        "intervals" : ["2018-01-01/2018-01-02"],
+        "rollup" : true
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "examples/",
+        "filter" : "ingestion-tutorial-data.json"
+      }
+    }
+  }
+}
+```
+
+## Additional tuning
+
+Each ingestion task has a `tuningConfig` section that allows users to tune various ingestion parameters.
+
+As an example, let's add a `tuningConfig` that sets a target segment size for the native batch ingestion task:
+
+```
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000
+    }
+```
+
+Note that each ingestion task has its own type of `tuningConfig`.
+
+## Final spec
+
+We've finished defining the ingestion spec, it should now look like the following:
+
+```
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "ingestion-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "timestampSpec" : {
+            "format" : "iso",
+            "column" : "ts"
+          },
+          "dimensionsSpec" : {
+            "dimensions": [
+              "srcIP",
+              { "name" : "srcPort", "type" : "long" },
+              { "name" : "dstIP", "type" : "string" },
+              { "name" : "dstPort", "type" : "long" },
+              { "name" : "protocol", "type" : "string" }
+            ]
+          }      
+        }
+      },
+      "metricsSpec" : [
+        { "type" : "count", "name" : "count" },
+        { "type" : "longSum", "name" : "packets", "fieldName" : "packets" },
+        { "type" : "longSum", "name" : "bytes", "fieldName" : "bytes" },
+        { "type" : "doubleSum", "name" : "cost", "fieldName" : "cost" }
+      ],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "HOUR",
+        "queryGranularity" : "MINUTE",
+        "intervals" : ["2018-01-01/2018-01-02"],
+        "rollup" : true
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "examples/",
+        "filter" : "ingestion-tutorial-data.json"
+      }
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000
+    }
+  }
+}
+```
+
+## Submit the task and query the data
+
+From the druid-${DRUIDVERSION} package root, run the following command:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/ingestion-tutorial-index.json http://localhost:8090/druid/indexer/v1/task
+```
+
+After the script completes, we will query the data.
+
+Let's issue a `select * from "ingestion-tutorial";` query to see what data was ingested.
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/ingestion-tutorial-select-sql.json http://localhost:8082/druid/v2/sql
+```
+
+```
+[
+  {
+    "__time": "2018-01-01T01:01:00.000Z",
+    "bytes": 6000,
+    "cost": 4.9,
+    "count": 3,
+    "dstIP": "2.2.2.2",
+    "dstPort": 3000,
+    "packets": 60,
+    "protocol": "6",
+    "srcIP": "1.1.1.1",
+    "srcPort": 2000
+  },
+  {
+    "__time": "2018-01-01T01:02:00.000Z",
+    "bytes": 9000,
+    "cost": 18.1,
+    "count": 2,
+    "dstIP": "2.2.2.2",
+    "dstPort": 7000,
+    "packets": 90,
+    "protocol": "6",
+    "srcIP": "1.1.1.1",
+    "srcPort": 5000
+  },
+  {
+    "__time": "2018-01-01T01:03:00.000Z",
+    "bytes": 6000,
+    "cost": 4.3,
+    "count": 1,
+    "dstIP": "2.2.2.2",
+    "dstPort": 7000,
+    "packets": 60,
+    "protocol": "6",
+    "srcIP": "1.1.1.1",
+    "srcPort": 5000
+  },
+  {
+    "__time": "2018-01-01T02:33:00.000Z",
+    "bytes": 30000,
+    "cost": 56.9,
+    "count": 2,
+    "dstIP": "8.8.8.8",
+    "dstPort": 5000,
+    "packets": 300,
+    "protocol": "17",
+    "srcIP": "7.7.7.7",
+    "srcPort": 4000
+  },
+  {
+    "__time": "2018-01-01T02:35:00.000Z",
+    "bytes": 30000,
+    "cost": 46.3,
+    "count": 1,
+    "dstIP": "8.8.8.8",
+    "dstPort": 5000,
+    "packets": 300,
+    "protocol": "17",
+    "srcIP": "7.7.7.7",
+    "srcPort": 4000
+  }
+]
+```
diff --git a/docs/content/tutorials/tutorial-kafka.md b/docs/content/tutorials/tutorial-kafka.md
index 5242df76f9f..77b83e7bcbd 100644
--- a/docs/content/tutorials/tutorial-kafka.md
+++ b/docs/content/tutorials/tutorial-kafka.md
@@ -2,33 +2,26 @@
 layout: doc_page
 ---
 
-# Tutorial: Load from Kafka
+# Tutorial: Load streaming data from Kafka
 
 ## Getting started
 
-This tutorial shows you how to load data from Kafka into Druid.
+This tutorial demonstrates how to load data from a Kafka stream, using the Druid Kafka indexing service.
 
-For this tutorial, we'll assume you've already downloaded Druid and Tranquility as described in
-the [single-machine quickstart](quickstart.html) and have it running on your local machine. You
+For this tutorial, we'll assume you've already downloaded Druid as described in 
+the [single-machine quickstart](index.html) and have it running on your local machine. You 
 don't need to have loaded any data yet.
 
-<div class="note info">
-This tutorial will show you how to load data from Kafka into Druid, but Druid additionally supports
-a wide variety of batch and streaming loading methods. See the <a href="../ingestion/batch-ingestion.html">Loading files</a>
-and <a href="../ingestion/stream-ingestion.html">Loading streams</a> pages for more information about other options,
-including from Hadoop, HTTP, Storm, Samza, Spark Streaming, and your own JVM apps.
-</div>
-
-## Start Kafka
+## Download and start Kafka
 
 [Apache Kafka](http://kafka.apache.org/) is a high throughput message bus that works well with
-Druid.  For this tutorial, we will use Kafka 0.9.0.0. To download Kafka, issue the following
+Druid.  For this tutorial, we will use Kafka 0.10.2.0. To download Kafka, issue the following
 commands in your terminal:
 
 ```bash
-curl -O http://www.us.apache.org/dist/kafka/0.9.0.0/kafka_2.11-0.9.0.0.tgz
-tar -xzf kafka_2.11-0.9.0.0.tgz
-cd kafka_2.11-0.9.0.0
+curl -O https://archive.apache.org/dist/kafka/0.10.2.0/kafka_2.11-0.10.2.0.tgz
+tar -xzf kafka_2.11-0.10.2.0.tgz
+cd kafka_2.11-0.10.2.0
 ```
 
 Start a Kafka broker by running the following command in a new terminal:
@@ -37,149 +30,49 @@ Start a Kafka broker by running the following command in a new terminal:
 ./bin/kafka-server-start.sh config/server.properties
 ```
 
-Run this command to create a Kafka topic called *metrics*, to which we'll send data:
+Run this command to create a Kafka topic called *wikipedia*, to which we'll send data:
 
 ```bash
-./bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic metrics
+./bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic wikipedia
 ```
 
-## Send example data
-
-Let's launch a console producer for our topic and send some data!
-
-In your Druid directory, generate some metrics by running:
+## Enable Druid Kafka ingestion
 
-```bash
-bin/generate-example-metrics
-```
-
-In your Kafka directory, run:
+We will use Druid's Kafka indexing service to ingest messages from our newly created *wikipedia* topic. To start the
+service, we will need to submit a supervisor spec to the Druid overlord by running the following from the Druid package root:
 
 ```bash
-./bin/kafka-console-producer.sh --broker-list localhost:9092 --topic metrics
+curl -XPOST -H'Content-Type: application/json' -d @examples/wikipedia-kafka-supervisor.json http://localhost:8090/druid/indexer/v1/supervisor
 ```
 
-The *kafka-console-producer* command is now awaiting input. Copy the generated example metrics,
-paste them into the *kafka-console-producer* terminal, and press enter. If you like, you can also
-paste more messages into the producer, or you can press CTRL-D to exit the console producer.
-
-You can immediately query this data, or you can skip ahead to the
-[Loading your own data](#loading-your-own-data) section if you'd like to load your own dataset.
-
-## Querying your data
-
-After sending data, you can immediately query it using any of the
-[supported query methods](../querying/querying.html).
-
-## Loading your own data
-
-So far, you've loaded data into Druid from Kafka using an ingestion spec that we've included in the
-distribution. Each ingestion spec is designed to work with a particular dataset. You load your own
-data types into Imply by writing a custom ingestion spec.
-
-You can write a custom ingestion spec by starting from the bundled configuration in
-`conf-quickstart/tranquility/kafka.json` and modifying it for your own needs.
-
-The most important questions are:
+If the supervisor was successfully created, you will get a response containing the ID of the supervisor; in our case we should see `{"id":"wikipedia-kafka"}`.
 
-  * What should the dataset be called? This is the "dataSource" field of the "dataSchema".
-  * Which field should be treated as a timestamp? This belongs in the "column" of the "timestampSpec".
-  * Which fields should be treated as dimensions? This belongs in the "dimensions" of the "dimensionsSpec".
-  * Which fields should be treated as measures? This belongs in the "metricsSpec".
+For more details about what's going on here, check out the
+[Druid Kafka indexing service documentation](http://druid.io/docs/{{druidVersion}}/development/extensions-core/kafka-ingestion.html).
 
-Let's use a small JSON pageviews dataset in the topic *pageviews* as an example, with records like:
+## Load data
 
-```json
-{"time": "2000-01-01T00:00:00Z", "url": "/foo/bar", "user": "alice", "latencyMs": 32}
-```
-
-First, create the topic:
-
-```bash
-./bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic pageviews
-```
+Let's launch a console producer for our topic and send some data!
 
-Next, edit `conf-quickstart/tranquility/kafka.json`:
-
-  * Let's call the dataset "pageviews-kafka".
-  * The timestamp is the "time" field.
-  * Good choices for dimensions are the string fields "url" and "user".
-  * Good choices for measures are a count of pageviews, and the sum of "latencyMs". Collecting that
-sum when we load the data will allow us to compute an average at query time as well.
-
-You can edit the existing `conf-quickstart/tranquility/kafka.json` file by altering these
-sections:
-
-  1. Change the key `"metrics-kafka"` under `"dataSources"` to `"pageviews-kafka"`
-  2. Alter these sections under the new `"pageviews-kafka"` key:
-  ```json
-  "dataSource": "pageviews-kafka"
-  ```
-
-  ```json
-  "timestampSpec": {
-       "format": "auto",
-       "column": "time"
-  }
-  ```
-
-  ```json
-  "dimensionsSpec": {
-       "dimensions": ["url", "user"]
-  }
-  ```
-
-  ```json
-  "metricsSpec": [
-       {"name": "views", "type": "count"},
-       {"name": "latencyMs", "type": "doubleSum", "fieldName": "latencyMs"}
-  ]
-  ```
-
-  ```json
-  "properties" : {
-       "task.partitions" : "1",
-       "task.replicants" : "1",
-       "topicPattern" : "pageviews"
-  }
-  ```
-
-Next, start Druid Kafka ingestion:
+In your Kafka directory, run the following command, where {PATH_TO_DRUID} is replaced by the path to the Druid directory:
 
 ```bash
-bin/tranquility kafka -configFile ../druid-#{DRUIDVERSION}/conf-quickstart/tranquility/kafka.json
+export KAFKA_OPTS="-Dfile.encoding=UTF-8"
+./bin/kafka-console-producer.sh --broker-list localhost:9092 --topic wikipedia < {PATH_TO_DRUID}/quickstart/wikiticker-2015-09-12-sampled.json
 ```
 
-- If your Tranquility server or Kafka is already running, stop it (CTRL-C) and
-start it up again.
-
-Finally, send some data to the Kafka topic. Let's start with these messages:
+The previous command posted sample events to the *wikipedia* Kafka topic which were then ingested into Druid by the Kafka indexing service. You're now ready to run some queries!
 
-```json
-{"time": "2000-01-01T00:00:00Z", "url": "/foo/bar", "user": "alice", "latencyMs": 32}
-{"time": "2000-01-01T00:00:00Z", "url": "/", "user": "bob", "latencyMs": 11}
-{"time": "2000-01-01T00:00:00Z", "url": "/foo/bar", "user": "bob", "latencyMs": 45}
-```
+## Querying your data
 
-Druid streaming ingestion requires relatively current messages (relative to a slack time controlled by the
-[windowPeriod](../ingestion/stream-ingestion.html#segmentgranularity-and-windowperiod) value), so you should
-replace `2000-01-01T00:00:00Z` in these messages with the current time in ISO8601 format. You can
-get this by running:
+After data is sent to the Kafka stream, it is immediately available for querying.
 
-```bash
-python -c 'import datetime; print(datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ"))'
-```
+Please follow the [query tutorial](../tutorial/tutorial-query.html) to run some example queries on the newly loaded data.
 
-Update the timestamps in the JSON above, then copy and paste these messages into this console
-producer and press enter:
-
-```bash
-./bin/kafka-console-producer.sh --broker-list localhost:9092 --topic pageviews
-```
+## Cleanup
 
-That's it, your data should now be in Druid. You can immediately query it using any of the
-[supported query methods](../querying/querying.html).
+If you wish to go through any of the other ingestion tutorials, you will need to reset the cluster and follow these [reset instructions](index.html#resetting-the-cluster), as the other tutorials will write to the same "wikipedia" datasource.
 
 ## Further reading
 
-To read more about loading streams, see our [streaming ingestion documentation](../ingestion/stream-ingestion.html).
+For more information on loading data from Kafka streams, please see the [Druid Kafka indexing service documentation](http://druid.io/docs/{{druidVersion}}/development/extensions-core/kafka-ingestion.html).
diff --git a/docs/content/tutorials/tutorial-query.md b/docs/content/tutorials/tutorial-query.md
new file mode 100644
index 00000000000..3744df0c9a2
--- /dev/null
+++ b/docs/content/tutorials/tutorial-query.md
@@ -0,0 +1,362 @@
+---
+layout: doc_page
+---
+
+# Tutorial: Querying data
+
+This tutorial will demonstrate how to query data in Druid, with examples for Druid's native query format and Druid SQL.
+
+The tutorial assumes that you've already completed one of the 4 ingestion tutorials, as we will be querying the sample Wikipedia edits data.
+
+* [Tutorial: Loading a file](/docs/VERSION/tutorials/tutorial-batch.html)
+* [Tutorial: Loading stream data from Kafka](/docs/VERSION/tutorials/tutorial-kafka.html)
+* [Tutorial: Loading a file using Hadoop](/docs/VERSION/tutorials/tutorial-batch-hadoop.html)
+* [Tutorial: Loading stream data using Tranquility](/docs/VERSION/tutorials/tutorial-tranquility.html)
+
+## Native JSON queries
+
+Druid's native query format is expressed in JSON. We have included a sample native TopN query under `examples/wikipedia-top-pages.json`:
+
+```json
+{
+  "queryType" : "topN",
+  "dataSource" : "wikipedia",
+  "intervals" : ["2015-09-12/2015-09-13"],
+  "granularity" : "all",
+  "dimension" : "page",
+  "metric" : "count",
+  "threshold" : 10,
+  "aggregations" : [
+    {
+      "type" : "count",
+      "name" : "count"
+    }
+  ]
+}
+```
+
+This query retrieves the 10 Wikipedia pages with the most page edits on 2015-09-12.
+
+Let's submit this query to the Druid broker:
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/wikipedia-top-pages.json http://localhost:8082/druid/v2?pretty
+```
+
+You should see the following query results:
+
+```json
+[ {
+  "timestamp" : "2015-09-12T00:46:58.771Z",
+  "result" : [ {
+    "count" : 33,
+    "page" : "Wikipedia:Vandalismusmeldung"
+  }, {
+    "count" : 28,
+    "page" : "User:Cyde/List of candidates for speedy deletion/Subpage"
+  }, {
+    "count" : 27,
+    "page" : "Jeremy Corbyn"
+  }, {
+    "count" : 21,
+    "page" : "Wikipedia:Administrators' noticeboard/Incidents"
+  }, {
+    "count" : 20,
+    "page" : "Flavia Pennetta"
+  }, {
+    "count" : 18,
+    "page" : "Total Drama Presents: The Ridonculous Race"
+  }, {
+    "count" : 18,
+    "page" : "User talk:Dudeperson176123"
+  }, {
+    "count" : 18,
+    "page" : "Wikipédia:Le Bistro/12 septembre 2015"
+  }, {
+    "count" : 17,
+    "page" : "Wikipedia:In the news/Candidates"
+  }, {
+    "count" : 17,
+    "page" : "Wikipedia:Requests for page protection"
+  } ]
+} ]
+```
+
+## Druid SQL queries
+
+Druid also supports a dialect of SQL for querying. Let's run a SQL query that is equivalent to the native JSON query shown above:
+
+```
+SELECT page, COUNT(*) AS Edits FROM wikipedia WHERE "__time" BETWEEN TIMESTAMP '2015-09-12 00:00:00' AND TIMESTAMP '2015-09-13 00:00:00' GROUP BY page ORDER BY Edits DESC LIMIT 10;
+```
+
+The SQL queries are submitted as JSON over HTTP.
+
+### TopN query example
+
+The tutorial package includes an example file that contains the SQL query shown above at `examples/wikipedia-top-pages-sql.json`. Let's submit that query to the Druid broker:
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/wikipedia-top-pages-sql.json http://localhost:8082/druid/v2/sql
+```
+
+The following results should be returned:
+
+```
+[
+  {
+    "page": "Wikipedia:Vandalismusmeldung",
+    "Edits": 33
+  },
+  {
+    "page": "User:Cyde/List of candidates for speedy deletion/Subpage",
+    "Edits": 28
+  },
+  {
+    "page": "Jeremy Corbyn",
+    "Edits": 27
+  },
+  {
+    "page": "Wikipedia:Administrators' noticeboard/Incidents",
+    "Edits": 21
+  },
+  {
+    "page": "Flavia Pennetta",
+    "Edits": 20
+  },
+  {
+    "page": "Total Drama Presents: The Ridonculous Race",
+    "Edits": 18
+  },
+  {
+    "page": "User talk:Dudeperson176123",
+    "Edits": 18
+  },
+  {
+    "page": "Wikipédia:Le Bistro/12 septembre 2015",
+    "Edits": 18
+  },
+  {
+    "page": "Wikipedia:In the news/Candidates",
+    "Edits": 17
+  },
+  {
+    "page": "Wikipedia:Requests for page protection",
+    "Edits": 17
+  }
+]
+```
+
+### Pretty Printing
+
+Note that Druid SQL does not support pretty printing of results. The output above was formatted using the [jq](https://stedolan.github.io/jq/) JSON processing tool. Other instances of SQL queries in these tutorials will also use `jq` formatting.
+
+### Additional Druid SQL queries
+
+The following section provides additional SQL examples that plan to various types of native Druid queries.
+
+#### Timeseries
+
+An example SQL timeseries query is available at `examples/wikipedia-timeseries-sql.json`. This query retrieves the total number of lines deleted from pages for each hour of 2015-09-12.
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/wikipedia-timeseries-sql.json http://localhost:8082/druid/v2/sql
+```
+
+The following results should be returned:
+
+```
+[
+  {
+    "HourTime": "2015-09-12T00:00:00.000Z",
+    "LinesDeleted": 1761
+  },
+  {
+    "HourTime": "2015-09-12T01:00:00.000Z",
+    "LinesDeleted": 16208
+  },
+  {
+    "HourTime": "2015-09-12T02:00:00.000Z",
+    "LinesDeleted": 14543
+  },
+  {
+    "HourTime": "2015-09-12T03:00:00.000Z",
+    "LinesDeleted": 13101
+  },
+  {
+    "HourTime": "2015-09-12T04:00:00.000Z",
+    "LinesDeleted": 12040
+  },
+  {
+    "HourTime": "2015-09-12T05:00:00.000Z",
+    "LinesDeleted": 6399
+  },
+  {
+    "HourTime": "2015-09-12T06:00:00.000Z",
+    "LinesDeleted": 9036
+  },
+  {
+    "HourTime": "2015-09-12T07:00:00.000Z",
+    "LinesDeleted": 11409
+  },
+  {
+    "HourTime": "2015-09-12T08:00:00.000Z",
+    "LinesDeleted": 11616
+  },
+  {
+    "HourTime": "2015-09-12T09:00:00.000Z",
+    "LinesDeleted": 17509
+  },
+  {
+    "HourTime": "2015-09-12T10:00:00.000Z",
+    "LinesDeleted": 19406
+  },
+  {
+    "HourTime": "2015-09-12T11:00:00.000Z",
+    "LinesDeleted": 16284
+  },
+  {
+    "HourTime": "2015-09-12T12:00:00.000Z",
+    "LinesDeleted": 18672
+  },
+  {
+    "HourTime": "2015-09-12T13:00:00.000Z",
+    "LinesDeleted": 30520
+  },
+  {
+    "HourTime": "2015-09-12T14:00:00.000Z",
+    "LinesDeleted": 18025
+  },
+  {
+    "HourTime": "2015-09-12T15:00:00.000Z",
+    "LinesDeleted": 26399
+  },
+  {
+    "HourTime": "2015-09-12T16:00:00.000Z",
+    "LinesDeleted": 24759
+  },
+  {
+    "HourTime": "2015-09-12T17:00:00.000Z",
+    "LinesDeleted": 19634
+  },
+  {
+    "HourTime": "2015-09-12T18:00:00.000Z",
+    "LinesDeleted": 17345
+  },
+  {
+    "HourTime": "2015-09-12T19:00:00.000Z",
+    "LinesDeleted": 19305
+  },
+  {
+    "HourTime": "2015-09-12T20:00:00.000Z",
+    "LinesDeleted": 22265
+  },
+  {
+    "HourTime": "2015-09-12T21:00:00.000Z",
+    "LinesDeleted": 16394
+  },
+  {
+    "HourTime": "2015-09-12T22:00:00.000Z",
+    "LinesDeleted": 16379
+  },
+  {
+    "HourTime": "2015-09-12T23:00:00.000Z",
+    "LinesDeleted": 15289
+  }
+]
+```
+#### GroupBy
+
+An example SQL GroupBy query is available at `examples/wikipedia-groupby-sql.json`. This query retrieves the total number of lines added for each Wikipedia language category (the channel) on 2015-09-12.
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/wikipedia-groupby-sql.json http://localhost:8082/druid/v2/sql
+```
+
+The following results should be returned:
+
+```
+[
+  {
+    "channel": "#en.wikipedia",
+    "EXPR$1": 3045299
+  },
+  {
+    "channel": "#it.wikipedia",
+    "EXPR$1": 711011
+  },
+  {
+    "channel": "#fr.wikipedia",
+    "EXPR$1": 642555
+  },
+  {
+    "channel": "#ru.wikipedia",
+    "EXPR$1": 640698
+  },
+  {
+    "channel": "#es.wikipedia",
+    "EXPR$1": 634670
+  }
+]
+```
+
+#### Scan
+
+An example SQL scan query is available at `examples/wikipedia-scan-sql.json`. This query retrieves 5 user-page pairs from the datasource.
+
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/wikipedia-scan-sql.json http://localhost:8082/druid/v2/sql
+```
+
+The following results should be returned:
+
+```
+[
+  {
+    "user": "Thiago89",
+    "page": "Campeonato Mundial de Voleibol Femenino Sub-20 de 2015"
+  },
+  {
+    "user": "91.34.200.249",
+    "page": "Friede von Schönbrunn"
+  },
+  {
+    "user": "TuHan-Bot",
+    "page": "Trĩ vàng"
+  },
+  {
+    "user": "Lowercase sigmabot III",
+    "page": "User talk:ErrantX"
+  },
+  {
+    "user": "BattyBot",
+    "page": "Hans W. Jung"
+  }
+]
+```
+
+#### EXPLAIN PLAN FOR
+
+By prepending `EXPLAIN PLAN FOR ` to a Druid SQL query, it is possible to see what native Druid queries a SQL query will plan into.
+
+An example query that explains the top pages query shown earlier has been provided at `examples/wikipedia-explain-sql.json`:
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/wikipedia-explain-top-pages-sql.json http://localhost:8082/druid/v2/sql
+```
+
+This will return the following plan:
+```
+[
+  {
+    "PLAN": "DruidQueryRel(query=[{\"queryType\":\"topN\",\"dataSource\":{\"type\":\"table\",\"name\":\"wikipedia\"},\"virtualColumns\":[],\"dimension\":{\"type\":\"default\",\"dimension\":\"page\",\"outputName\":\"d0\",\"outputType\":\"STRING\"},\"metric\":{\"type\":\"numeric\",\"metric\":\"a0\"},\"threshold\":10,\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"2015-09-12T00:00:00.000Z/2015-09-13T00:00:00.001Z\"]},\"filter\":null,\"granularity\":{\"type\":\"all\"},\"aggregations\":[{\"type\":\"count\",\"name\":\"a0\"}],\"postAggregations\":[],\"context\":{},\"descending\":false}], signature=[{d0:STRING, a0:LONG}])\n"
+  }
+]
+```
+
+## Further reading
+
+The [Queries documentation](/docs/VERSION/querying/querying.html) has more information on Druid's native JSON queries.
+
+The [Druid SQL documentation](/docs/VERSION/querying/sql.html) has more information on using Druid SQL queries.
\ No newline at end of file
diff --git a/docs/content/tutorials/tutorial-retention.md b/docs/content/tutorials/tutorial-retention.md
new file mode 100644
index 00000000000..afea21893bc
--- /dev/null
+++ b/docs/content/tutorials/tutorial-retention.md
@@ -0,0 +1,92 @@
+---
+layout: doc_page
+---
+
+# Tutorial: Configuring data retention
+
+This tutorial demonstrates how to configure retention rules on a datasource to set the time intervals of data that will be retained or dropped.
+
+For this tutorial, we'll assume you've already downloaded Druid as described in 
+the [single-machine quickstart](index.html) and have it running on your local machine. 
+
+It will also be helpful to have finished [Tutorial: Loading a file](/docs/VERSION/tutorials/tutorial-batch.html) and [Tutorial: Querying data](/docs/VERSION/tutorials/tutorial-query.html).
+
+## Load the example data
+
+For this tutorial, we'll be using the Wikipedia edits sample data, with an ingestion task spec that will create a separate segment for each hour in the input data.
+
+The ingestion spec can be found at `examples/retention-index.json`. Let's submit that spec, which will create a datasource called `retention-tutorial`:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/retention-index.json http://localhost:8090/druid/indexer/v1/task
+```
+
+After the ingestion completes, go to http://localhost:8081 in a browser to access the Coordinator console.
+ 
+In the Coordinator console, go to the `datasources` tab at the top of the page.
+
+This tab shows the available datasources and a summary of the retention rules for each datasource:
+
+![Summary](../tutorials/img/tutorial-retention-00.png "Summary")
+
+Currently there are no rules set for the `retention-tutorial` datasource. Note that there are default rules, currently set to `load Forever 2 in _default_tier`. 
+
+This means that all data will be loaded regardless of timestamp, and each segment will be replicated to two nodes in the default tier. 
+
+In this tutorial, we will ignore the tiering and redundancy concepts for now.
+
+Let's click the `retention-tutorial` datasource on the left. 
+
+The next page (http://localhost:8081/#/datasources/retention-tutorial) provides information about what segments a datasource contains. On the left, the page shows that there are 24 segments, each one containing data for a specific hour of 2015-09-12:
+
+![Original segments](../tutorials/img/tutorial-retention-01.png "Original segments")
+
+## Set retention rules
+
+Suppose we want to drop data for the first 12 hours of 2015-09-12 and keep data for the later 12 hours of 2015-09-12.
+
+Click the `edit rules` button with a pencil icon at the upper left corner of the page.
+
+A rule configuration window will appear. Enter `tutorial` for both the user and changelog comment field.
+
+Now click the `+ Add a rule` button twice. 
+
+In the `rule #1` box at the top, click `Load`, `Interval`, enter `2015-09-12T12:00:00.000Z/2015-09-13T00:00:00.000Z` in the interval box, and click `+ _default_tier replicant`.
+
+In the `rule #2` box at the bottom, click `Drop` and `Forever`.
+
+The rules should look like this:
+
+![Set rules](../tutorials/img/tutorial-retention-02.png "Set rules")
+
+Now click `Save all rules`, wait for a few seconds, and refresh the page. 
+
+The segments for the first 12 hours of 2015-09-12 are now gone:
+
+![New segments](../tutorials/img/tutorial-retention-03.png "New segments")
+
+The resulting retention rule chain is the following:
+
+```
+loadByInterval 2015-09-12T12/2015-09-13 (12 hours)
+
+dropForever
+
+loadForever (default rule)
+```
+
+The rule chain is evaluated from top to bottom, with the default rule chain always added at the bottom.
+
+The tutorial rule chain we just created loads data if it is within the specified 12 hour interval. 
+
+If data is not within the 12 hour interval, the rule chain evaluates `dropForever` next, which will drop any data.
+
+The `dropForever` terminates the rule chain, effectively overriding the default `loadForever` rule, which will never be reached in this rule chain.
+
+Note that in this tutorial we defined a load rule on a specific interval. 
+
+If instead you want to retain data based on how old it is (e.g., retain data that ranges from 3 months in the past to the present time), you would define a Period load rule instead.
+
+## Further reading
+
+* [Load rules](/docs/VERSION/operations/rule-configuration.html)
diff --git a/docs/content/tutorials/tutorial-rollup.md b/docs/content/tutorials/tutorial-rollup.md
new file mode 100644
index 00000000000..8fe45849944
--- /dev/null
+++ b/docs/content/tutorials/tutorial-rollup.md
@@ -0,0 +1,221 @@
+---
+layout: doc_page
+---
+
+# Tutorial: Roll-up
+
+Druid can summarize raw data at ingestion time using a process we refer to as "roll-up". Roll-up is a first-level aggregation operation over a selected set of columns that reduces the size of stored segments.
+
+This tutorial will demonstrate the effects of roll-up on an example dataset.
+
+For this tutorial, we'll assume you've already downloaded Druid as described in 
+the [single-machine quickstart](index.html) and have it running on your local machine.
+
+It will also be helpful to have finished [Tutorial: Loading a file](/docs/VERSION/tutorials/tutorial-batch.html) and [Tutorial: Querying data](/docs/VERSION/tutorials/tutorial-query.html).
+
+## Example data
+
+For this tutorial, we'll use a small sample of network flow event data, representing packet and byte counts for traffic from a source to a destination IP address that occurred within a particular second.
+
+```
+{"timestamp":"2018-01-01T01:01:35Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":20,"bytes":9024}
+{"timestamp":"2018-01-01T01:01:51Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":255,"bytes":21133}
+{"timestamp":"2018-01-01T01:01:59Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":11,"bytes":5780}
+{"timestamp":"2018-01-01T01:02:14Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":38,"bytes":6289}
+{"timestamp":"2018-01-01T01:02:29Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":377,"bytes":359971}
+{"timestamp":"2018-01-01T01:03:29Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":49,"bytes":10204}
+{"timestamp":"2018-01-02T21:33:14Z","srcIP":"7.7.7.7", "dstIP":"8.8.8.8","packets":38,"bytes":6289}
+{"timestamp":"2018-01-02T21:33:45Z","srcIP":"7.7.7.7", "dstIP":"8.8.8.8","packets":123,"bytes":93999}
+{"timestamp":"2018-01-02T21:35:45Z","srcIP":"7.7.7.7", "dstIP":"8.8.8.8","packets":12,"bytes":2818}
+```
+
+A file containing this sample input data is located at `examples/rollup-data.json`.
+
+We'll ingest this data using the following ingestion task spec, located at `examples/rollup-index.json`.
+
+```
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "rollup-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "srcIP",
+              "dstIP"
+            ]
+          },
+          "timestampSpec": {
+            "column": "timestamp",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [
+        { "type" : "count", "name" : "count" },
+        { "type" : "longSum", "name" : "packets", "fieldName" : "packets" },
+        { "type" : "longSum", "name" : "bytes", "fieldName" : "bytes" }
+      ],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "week",
+        "queryGranularity" : "minute",
+        "intervals" : ["2018-01-01/2018-01-03"],
+        "rollup" : true
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "examples",
+        "filter" : "rollup-data.json"
+      },
+      "appendToExisting" : false
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
+```
+
+Roll-up has been enabled by setting `"rollup" : true` in the `granularitySpec`.
+
+Note that we have `srcIP` and `dstIP` defined as dimensions, a longSum metric is defined for the `packets` and `bytes` columns, and the `queryGranularity` has been defined as `minute`. 
+
+We will see how these definitions are used after we load this data.
+
+## Load the example data
+
+From the druid-${DRUIDVERSION} package root, run the following command:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/rollup-index.json http://localhost:8090/druid/indexer/v1/task
+```
+
+After the data is loaded, we will query the data.
+
+## Query the example data
+
+Let's issue a `select * from "rollup-tutorial";` query to see what data was ingested.
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/rollup-select-sql.json http://localhost:8082/druid/v2/sql
+```
+
+The following results will be returned:
+
+```
+[
+  {
+    "__time": "2018-01-01T01:01:00.000Z",
+    "bytes": 35937,
+    "count": 3,
+    "dstIP": "2.2.2.2",
+    "packets": 286,
+    "srcIP": "1.1.1.1"
+  },
+  {
+    "__time": "2018-01-01T01:02:00.000Z",
+    "bytes": 366260,
+    "count": 2,
+    "dstIP": "2.2.2.2",
+    "packets": 415,
+    "srcIP": "1.1.1.1"
+  },
+  {
+    "__time": "2018-01-01T01:03:00.000Z",
+    "bytes": 10204,
+    "count": 1,
+    "dstIP": "2.2.2.2",
+    "packets": 49,
+    "srcIP": "1.1.1.1"
+  },
+  {
+    "__time": "2018-01-02T21:33:00.000Z",
+    "bytes": 100288,
+    "count": 2,
+    "dstIP": "8.8.8.8",
+    "packets": 161,
+    "srcIP": "7.7.7.7"
+  },
+  {
+    "__time": "2018-01-02T21:35:00.000Z",
+    "bytes": 2818,
+    "count": 1,
+    "dstIP": "8.8.8.8",
+    "packets": 12,
+    "srcIP": "7.7.7.7"
+  }
+]
+```
+
+Let's look at the three events in the original input data that occurred during `2018-01-01T01:01`:
+
+```
+{"timestamp":"2018-01-01T01:01:35Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":20,"bytes":9024}
+{"timestamp":"2018-01-01T01:01:51Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":255,"bytes":21133}
+{"timestamp":"2018-01-01T01:01:59Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":11,"bytes":5780}
+```
+
+These three rows have been "rolled up" into the following row:
+
+```
+  {
+    "__time": "2018-01-01T01:01:00.000Z",
+    "bytes": 35937,
+    "count": 3,
+    "dstIP": "2.2.2.2",
+    "packets": 286,
+    "srcIP": "1.1.1.1"
+  },
+```
+
+The input rows have been grouped by the timestamp and dimension columns `{timestamp, srcIP, dstIP}` with sum aggregations on the metric columns `packets` and `bytes`.
+
+Before the grouping occurs, the timestamps of the original input data are bucketed/floored by minute, due to the `"queryGranularity":"minute"` setting in the ingestion spec.
+
+Likewise, these two events that occurred during `2018-01-01T01:02` have been rolled up:
+
+```
+{"timestamp":"2018-01-01T01:02:14Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":38,"bytes":6289}
+{"timestamp":"2018-01-01T01:02:29Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":377,"bytes":359971}
+```
+
+```
+  {
+    "__time": "2018-01-01T01:02:00.000Z",
+    "bytes": 366260,
+    "count": 2,
+    "dstIP": "2.2.2.2",
+    "packets": 415,
+    "srcIP": "1.1.1.1"
+  },
+```
+
+For the last event recording traffic between 1.1.1.1 and 2.2.2.2, no roll-up took place, because this was the only event that occurred during `2018-01-01T01:03`:
+
+```
+{"timestamp":"2018-01-01T01:03:29Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":49,"bytes":10204}
+```
+
+```
+  {
+    "__time": "2018-01-01T01:03:00.000Z",
+    "bytes": 10204,
+    "count": 1,
+    "dstIP": "2.2.2.2",
+    "packets": 49,
+    "srcIP": "1.1.1.1"
+  },
+```
+
+Note that the `count` metric shows how many rows in the original input data contributed to the final "rolled up" row.
\ No newline at end of file
diff --git a/docs/content/tutorials/tutorial-streams.md b/docs/content/tutorials/tutorial-streams.md
deleted file mode 100644
index c20fb23a6c7..00000000000
--- a/docs/content/tutorials/tutorial-streams.md
+++ /dev/null
@@ -1,134 +0,0 @@
----
-layout: doc_page
----
-
-# Tutorial: Load your own streaming data
-
-## Getting started
-
-This tutorial shows you how to load your own streams into Druid.
-
-For this tutorial, we'll assume you've already downloaded Druid and Tranquility as described in
-the [single-machine quickstart](quickstart.html) and have it running on your local machine. You
-don't need to have loaded any data yet.
-
-Once that's complete, you can load your own dataset by writing a custom ingestion spec.
-
-## Writing an ingestion spec
-
-When loading streams into Druid, we recommend using the [stream push](../ingestion/stream-push.html)
-process. In this tutorial we'll be using [Tranquility Server](../ingestion/stream-ingestion.html#server) to push
-data into Druid over HTTP.
-
-<div class="note info">
-This tutorial will show you how to push streams to Druid using HTTP, but Druid additionally supports
-a wide variety of batch and streaming loading methods. See the <a href="../ingestion/batch-ingestion.html">Loading files</a>
-and <a href="../ingestion/stream-ingestion.html">Loading streams</a> pages for more information about other options,
-including from Hadoop, Kafka, Storm, Samza, Spark Streaming, and your own JVM apps.
-</div>
-
-You can prepare for loading a new dataset over HTTP by writing a custom Tranquility Server
-configuration. The bundled configuration is in `conf-quickstart/tranquility/server.json`, which
-you can modify for your own needs.
-
-The most important questions are:
-
-  * What should the dataset be called? This is the "dataSource" field of the "dataSchema".
-  * Which field should be treated as a timestamp? This belongs in the "column" field of the "timestampSpec".
-  * Which fields should be treated as dimensions? This belongs in the "dimensions" field of the "dimensionsSpec".
-  * Which fields should be treated as measures? This belongs in the "metricsSpec" field.
-
-Let's use a small JSON pageviews dataset as an example, with records like:
-
-```json
-{"time": "2000-01-01T00:00:00Z", "url": "/foo/bar", "user": "alice", "latencyMs": 32}
-```
-
-So the answers to the questions above are:
-
-  * Let's call the dataset "pageviews".
-  * The timestamp is the "time" field.
-  * Good choices for dimensions are the string fields "url" and "user".
-  * Good choices for measures are a count of pageviews, and the sum of "latencyMs". Collecting that
-sum when we load the data will allow us to compute an average at query time as well.
-
-Now, edit the existing `conf-quickstart/tranquility/server.json` file by altering these
-sections:
-
-  1. Change the key `"metrics"` under `"dataSources"` to `"pageviews"`
-  2. Alter these sections under the new `"pageviews"` key:
-  ```json
-  "dataSource": "pageviews"
-  ```
-
-  ```json
-  "timestampSpec": {
-       "format": "auto",
-       "column": "time"
-  }
-  ```
-
-  ```json
-  "dimensionsSpec": {
-       "dimensions": ["url", "user"]
-  }
-  ```
-
-  ```json
-  "metricsSpec": [
-       {"name": "views", "type": "count"},
-       {"name": "latencyMs", "type": "doubleSum", "fieldName": "latencyMs"}
-  ]
-  ```
-
-## Restarting the server
-
-Restart the server to pick up the new configuration file by stopping Tranquility (CTRL-C) and starting it up again.
-
-## Sending data
-
-Let's send some data! We'll start with these three records:
-
-```json
-{"time": "2000-01-01T00:00:00Z", "url": "/foo/bar", "user": "alice", "latencyMs": 32}
-{"time": "2000-01-01T00:00:00Z", "url": "/", "user": "bob", "latencyMs": 11}
-{"time": "2000-01-01T00:00:00Z", "url": "/foo/bar", "user": "bob", "latencyMs": 45}
-```
-
-Druid streaming ingestion requires relatively current messages (relative to a slack time controlled by the
-[windowPeriod](../ingestion/stream-push.html#segmentgranularity-and-windowperiod) value), so you should
-replace `2000-01-01T00:00:00Z` in these messages with the current time in ISO8601 format. You can
-get this by running:
-
-```bash
-python -c 'import datetime; print(datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ"))'
-```
-
-Update the timestamps in the JSON above, and save it to a file named `pageviews.json`. Then send
-it to Druid by running:
-
-```bash
-curl -XPOST -H'Content-Type: application/json' --data-binary @pageviews.json http://localhost:8200/v1/post/pageviews
-```
-
-This will print something like:
-
-```
-{"result":{"received":3,"sent":3}}
-```
-
-This indicates that the HTTP server received 3 events from you, and sent 3 to Druid. Note that
-this may take a few seconds to finish the first time you run it, as Druid resources must be
-allocated to the ingestion task. Subsequent POSTs should complete quickly.
-
-If you see `"sent":0` this likely means that your timestamps are not recent enough. Try adjusting
-your timestamps and re-sending your data.
-
-## Querying your data
-
-After sending data, you can immediately query it using any of the
-[supported query methods](../querying/querying.html).
-
-## Further reading
-
-To read more about loading streams, see our [streaming ingestion documentation](../ingestion/stream-ingestion.html).
diff --git a/docs/content/tutorials/tutorial-tranquility.md b/docs/content/tutorials/tutorial-tranquility.md
new file mode 100644
index 00000000000..773355c13ee
--- /dev/null
+++ b/docs/content/tutorials/tutorial-tranquility.md
@@ -0,0 +1,76 @@
+---
+layout: doc_page
+---
+
+# Tutorial: Load streaming data with HTTP push
+
+## Getting started
+
+This tutorial shows you how to load streaming data into Druid using HTTP push via Tranquility Server.
+
+[Tranquility Server](https://github.com/druid-io/tranquility/blob/master/docs/server.md) allows a stream of data to be pushed into Druid using HTTP POSTs.
+
+For this tutorial, we'll assume you've already downloaded Druid as described in
+the [single-machine quickstart](quickstart.html) and have it running on your local machine. You
+don't need to have loaded any data yet.
+
+## Download Tranquility
+
+In the Druid package root, run the following commands:
+
+```
+curl http://static.druid.io/tranquility/releases/tranquility-distribution-0.8.2.tgz -o tranquility-distribution-0.8.2.tgz
+tar -xzf tranquility-distribution-0.8.2.tgz
+cd tranquility-distribution-0.8.2
+```
+
+## Run Tranquility server
+
+Run the following command:
+
+```
+bin/tranquility server -configFile ../examples/conf/tranquility/wikipedia-server.json -Ddruid.extensions.loadList=[]
+```
+
+## Send data
+
+Let's send the sample Wikipedia edits data to Tranquility:
+
+```
+curl -XPOST -H'Content-Type: application/json' --data-binary @quickstart/wikiticker-2015-09-12-sampled.json http://localhost:8200/v1/post/wikipedia
+```
+
+Which will print something like:
+
+```
+{"result":{"received":39244,"sent":39244}}
+```
+
+This indicates that the HTTP server received 39,244 events from you, and sent 39,244 to Druid. This
+command may generate a "connection refused" error if you run it too quickly after enabling Tranquility
+Server, which means the server has not yet started up. It should start up within a few seconds. The command
+may also take a few seconds to finish the first time you run it, during which time Druid resources are being
+allocated to the ingestion task. Subsequent POSTs will complete quickly once this is done.
+
+Once the data is sent to Druid, you can immediately query it.
+
+If you see a `sent` count of 0, retry the send command until the `sent` count also shows 39244:
+
+```
+{"result":{"received":39244,"sent":0}}
+```
+
+## Querying your data
+
+Please follow the [query tutorial](../tutorial/tutorial-query.html) to run some example queries on the newly loaded data.
+
+## Cleanup
+
+If you wish to go through any of the other ingestion tutorials, you will need to reset the cluster and follow these [reset instructions](index.html#resetting-the-cluster), as the other tutorials will write to the same "wikipedia" datasource.
+
+When cleaning up after running this Tranquility tutorial, it is also necessary to recomment the `tranquility-server` line in `quickstart/tutorial/conf/tutorial-cluster.conf` before restarting the cluster.
+
+
+## Further reading
+
+For more information on Tranquility, please see [the Tranquility documentation](https://github.com/druid-io/tranquility).
diff --git a/docs/content/tutorials/tutorial-transform-spec.md b/docs/content/tutorials/tutorial-transform-spec.md
new file mode 100644
index 00000000000..4d3ab0634ae
--- /dev/null
+++ b/docs/content/tutorials/tutorial-transform-spec.md
@@ -0,0 +1,159 @@
+---
+layout: doc_page
+---
+
+# Tutorial: Transforming input data
+
+This tutorial will demonstrate how to use transform specs to filter and transform input data during ingestion.
+
+For this tutorial, we'll assume you've already downloaded Druid as described in 
+the [single-machine quickstart](index.html) and have it running on your local machine.
+
+It will also be helpful to have finished [Tutorial: Loading a file](/docs/VERSION/tutorials/tutorial-batch.html) and [Tutorial: Querying data](/docs/VERSION/tutorials/tutorial-query.html).
+
+## Sample data
+
+We've included sample data for this tutorial at `examples/transform-data.json`, reproduced here for convenience:
+
+```
+{"timestamp":"2018-01-01T07:01:35Z","animal":"octopus",  "location":1, "number":100}
+{"timestamp":"2018-01-01T05:01:35Z","animal":"mongoose", "location":2,"number":200}
+{"timestamp":"2018-01-01T06:01:35Z","animal":"snake", "location":3, "number":300}
+{"timestamp":"2018-01-01T01:01:35Z","animal":"lion", "location":4, "number":300}
+```
+
+## Load data with transform specs
+
+We will ingest the sample data using the following spec, which demonstrates the use of transform specs:
+
+```
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "transform-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "animal",
+              { "name": "location", "type": "long" }
+            ]
+          },
+          "timestampSpec": {
+            "column": "timestamp",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [
+        { "type" : "count", "name" : "count" },
+        { "type" : "longSum", "name" : "number", "fieldName" : "number" },
+        { "type" : "longSum", "name" : "triple-number", "fieldName" : "triple-number" }
+      ],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "week",
+        "queryGranularity" : "minute",
+        "intervals" : ["2018-01-01/2018-01-03"],
+        "rollup" : true
+      },
+      "transformSpec": {
+        "transforms": [
+          {
+            "type": "expression",
+            "name": "animal",
+            "expression": "concat('super-', animal)"
+          },
+          {
+            "type": "expression",
+            "name": "triple-number",
+            "expression": "number * 3"
+          }
+        ],
+        "filter": {
+          "type":"or",
+          "fields": [
+            { "type": "selector", "dimension": "animal", "value": "super-mongoose" },
+            { "type": "selector", "dimension": "triple-number", "value": "300" },
+            { "type": "selector", "dimension": "location", "value": "3" }
+          ]
+        }
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "examples/",
+        "filter" : "transform-data.json"
+      },
+      "appendToExisting" : false
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
+```
+
+In the transform spec, we have two expression transforms:
+* `super-animal`: prepends "super-" to the values in the `animal` column. This will override the `animal` column with the transformed version, since the transform's name is `animal`.
+* `triple-number`: multiplies the `number` column by 3. This will create a new `triple-number` column. Note that we are ingesting both the original and the transformed column.
+
+Additionally, we have an OR filter with three clauses:
+* `super-animal` values that match "super-mongoose"
+* `triple-number` values that match 300
+* `location` values that match 3
+
+This filter selects the first 3 rows, and it will exclude the final "lion" row in the input data. Note that the filter is applied after the transformation.
+
+Let's submit this task now, which has been included at `quickstart/tutorial/transform-index.json`:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/transform-index.json http://localhost:8090/druid/indexer/v1/task
+```
+
+## Query the transformed data
+
+Let's a `select * from "transform-tutorial";` query to see what was ingested:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/transform-select-sql.json http://localhost:8082/druid/v2/sql
+```
+
+```
+[
+  {
+    "__time": "2018-01-01T05:01:00.000Z",
+    "animal": "super-mongoose",
+    "count": 1,
+    "location": 2,
+    "number": 200,
+    "triple-number": 600
+  },
+  {
+    "__time": "2018-01-01T06:01:00.000Z",
+    "animal": "super-snake",
+    "count": 1,
+    "location": 3,
+    "number": 300,
+    "triple-number": 900
+  },
+  {
+    "__time": "2018-01-01T07:01:00.000Z",
+    "animal": "super-octopus",
+    "count": 1,
+    "location": 1,
+    "number": 100,
+    "triple-number": 300
+  }
+]
+```
+
+The "lion" row has been discarded, the `animal` column has been transformed, and we have both the original and transformed `number` column.
\ No newline at end of file
diff --git a/docs/content/tutorials/tutorial-update-data.md b/docs/content/tutorials/tutorial-update-data.md
new file mode 100644
index 00000000000..e37b18a9efb
--- /dev/null
+++ b/docs/content/tutorials/tutorial-update-data.md
@@ -0,0 +1,229 @@
+---
+layout: doc_page
+---
+
+# Tutorial: Updating existing data
+
+This tutorial demonstrates how to update existing data, showing both overwrites and appends.
+
+For this tutorial, we'll assume you've already downloaded Druid as described in 
+the [single-machine quickstart](index.html) and have it running on your local machine. 
+
+It will also be helpful to have finished [Tutorial: Loading a file](/docs/VERSION/tutorials/tutorial-batch.html), [Tutorial: Querying data](/docs/VERSION/tutorials/tutorial-query.html), and [Tutorial: Rollup](/docs/VERSION/tutorials/tutorial-rollup.html).
+
+## Overwrite
+
+This section of the tutorial will cover how to overwrite an existing interval of data.
+
+### Load initial data
+
+Let's load an initial data set which we will overwrite and append to.
+
+The spec we'll use for this tutorial is located at `examples/updates-init-index.json`. This spec creates a datasource called `updates-tutorial` from the `examples/updates-data.json` input file.
+
+Let's submit that task:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/updates-init-index.json http://localhost:8090/druid/indexer/v1/task
+```
+
+We have three initial rows containing an "animal" dimension and "number" metric:
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/updates-select-sql.json http://localhost:8082/druid/v2/sql
+```
+
+```
+[
+  {
+    "__time": "2018-01-01T01:01:00.000Z",
+    "animal": "tiger",
+    "count": 1,
+    "number": 100
+  },
+  {
+    "__time": "2018-01-01T03:01:00.000Z",
+    "animal": "aardvark",
+    "count": 1,
+    "number": 42
+  },
+  {
+    "__time": "2018-01-01T03:01:00.000Z",
+    "animal": "giraffe",
+    "count": 1,
+    "number": 14124
+  }
+]
+```
+
+### Overwrite the initial data
+
+To overwrite this data, we can submit another task for the same interval, but with different input data.
+
+The `examples/updates-overwrite-index.json` spec will perform an overwrite on the `updates-tutorial` datasource.
+
+Note that this task reads input from `examples/updates-data2.json`, and `appendToExisting` is set to `false` (indicating this is an overwrite).
+
+Let's submit that task:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/updates-overwrite-index.json http://localhost:8090/druid/indexer/v1/task
+```
+
+When Druid finishes loading the new segment from this overwrite task, the "tiger" row now has the value "lion", the "aardvark" row has a different number, and the "giraffe" row has been replaced. It may take a couple of minutes for the changes to take effect:
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/updates-select-sql.json http://localhost:8082/druid/v2/sql
+```
+
+```
+[
+  {
+    "__time": "2018-01-01T01:01:00.000Z",
+    "animal": "lion",
+    "count": 1,
+    "number": 100
+  },
+  {
+    "__time": "2018-01-01T03:01:00.000Z",
+    "animal": "aardvark",
+    "count": 1,
+    "number": 9999
+  },
+  {
+    "__time": "2018-01-01T04:01:00.000Z",
+    "animal": "bear",
+    "count": 1,
+    "number": 111
+  }
+]
+
+```
+
+## Append to the data
+
+Let's try appending data.
+
+The `examples/updates-append-index.json` task spec reads input from `examples/updates-data3.json` and will append its data to the `updates-tutorial` datasource. Note that `appendToExisting` is set to `true` in this spec.
+
+Let's submit that task:
+
+```
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/updates-append-index.json http://localhost:8090/druid/indexer/v1/task
+```
+
+When the new data is loaded, we can see two additional rows after "octopus". Note that the new "bear" row with number 222 has not been rolled up with the existing bear-111 row, because the new data is held in a separate segment. The same applies to the two "lion" rows.
+
+```
+[
+  {
+    "__time": "2018-01-01T01:01:00.000Z",
+    "animal": "lion",
+    "count": 1,
+    "number": 100
+  },
+  {
+    "__time": "2018-01-01T03:01:00.000Z",
+    "animal": "aardvark",
+    "count": 1,
+    "number": 9999
+  },
+  {
+    "__time": "2018-01-01T04:01:00.000Z",
+    "animal": "bear",
+    "count": 1,
+    "number": 111
+  },
+  {
+    "__time": "2018-01-01T01:01:00.000Z",
+    "animal": "lion",
+    "count": 1,
+    "number": 300
+  },
+  {
+    "__time": "2018-01-01T04:01:00.000Z",
+    "animal": "bear",
+    "count": 1,
+    "number": 222
+  },
+  {
+    "__time": "2018-01-01T05:01:00.000Z",
+    "animal": "mongoose",
+    "count": 1,
+    "number": 737
+  },
+  {
+    "__time": "2018-01-01T06:01:00.000Z",
+    "animal": "snake",
+    "count": 1,
+    "number": 1234
+  },
+  {
+    "__time": "2018-01-01T07:01:00.000Z",
+    "animal": "octopus",
+    "count": 1,
+    "number": 115
+  },
+  {
+    "__time": "2018-01-01T09:01:00.000Z",
+    "animal": "falcon",
+    "count": 1,
+    "number": 1241
+  }
+]
+```
+
+If we run a GroupBy query instead of a `select *`, we can see that the separate "lion" and "bear" rows will group together at query time:
+
+`select __time, animal, SUM("count"), SUM("number") from "updates-tutorial" group by __time, animal;`
+
+```bash
+curl -X 'POST' -H 'Content-Type:application/json' -d @examples/updates-groupby-sql.json http://localhost:8082/druid/v2/sql
+```
+
+```
+[
+  {
+    "__time": "2018-01-01T01:01:00.000Z",
+    "animal": "lion",
+    "EXPR$2": 2,
+    "EXPR$3": 400
+  },
+  {
+    "__time": "2018-01-01T03:01:00.000Z",
+    "animal": "aardvark",
+    "EXPR$2": 1,
+    "EXPR$3": 9999
+  },
+  {
+    "__time": "2018-01-01T04:01:00.000Z",
+    "animal": "bear",
+    "EXPR$2": 2,
+    "EXPR$3": 333
+  },
+  {
+    "__time": "2018-01-01T05:01:00.000Z",
+    "animal": "mongoose",
+    "EXPR$2": 1,
+    "EXPR$3": 737
+  },
+  {
+    "__time": "2018-01-01T06:01:00.000Z",
+    "animal": "snake",
+    "EXPR$2": 1,
+    "EXPR$3": 1234
+  },
+  {
+    "__time": "2018-01-01T07:01:00.000Z",
+    "animal": "octopus",
+    "EXPR$2": 1,
+    "EXPR$3": 115
+  },
+  {
+    "__time": "2018-01-01T09:01:00.000Z",
+    "animal": "falcon",
+    "EXPR$2": 1,
+    "EXPR$3": 1241
+  }
+]
+```
\ No newline at end of file
diff --git a/examples/quickstart/tutorial/examples/compaction-count-sql.json b/examples/quickstart/tutorial/examples/compaction-count-sql.json
new file mode 100644
index 00000000000..1a835e3804a
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/compaction-count-sql.json
@@ -0,0 +1,3 @@
+{
+  "query":"select count(*) from \"compaction-tutorial\""
+}
diff --git a/examples/quickstart/tutorial/examples/compaction-final-index.json b/examples/quickstart/tutorial/examples/compaction-final-index.json
new file mode 100644
index 00000000000..b84e2ed78d5
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/compaction-final-index.json
@@ -0,0 +1,11 @@
+{
+  "type": "compact",
+  "dataSource": "compaction-tutorial",
+  "interval": "2015-09-12/2015-09-13",
+  "tuningConfig" : {
+    "type" : "index",
+    "targetPartitionSize" : 5000000,
+    "maxRowsInMemory" : 25000,
+    "forceExtendableShardSpecs" : true
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/compaction-init-index.json b/examples/quickstart/tutorial/examples/compaction-init-index.json
new file mode 100644
index 00000000000..f03c3714f51
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/compaction-init-index.json
@@ -0,0 +1,64 @@
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "compaction-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "channel",
+              "cityName",
+              "comment",
+              "countryIsoCode",
+              "countryName",
+              "isAnonymous",
+              "isMinor",
+              "isNew",
+              "isRobot",
+              "isUnpatrolled",
+              "metroCode",
+              "namespace",
+              "page",
+              "regionIsoCode",
+              "regionName",
+              "user",
+              { "name": "added", "type": "long" },
+              { "name": "deleted", "type": "long" },
+              { "name": "delta", "type": "long" }
+            ]
+          },
+          "timestampSpec": {
+            "column": "time",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "hour",
+        "queryGranularity" : "none",
+        "intervals" : ["2015-09-12/2015-09-13"],
+        "rollup" : false
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "quickstart/",
+        "filter" : "wikiticker-2015-09-12-sampled.json.gz"
+      },
+      "appendToExisting" : false
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/conf/druid/_common/common.runtime.properties b/examples/quickstart/tutorial/examples/conf/druid/_common/common.runtime.properties
new file mode 100644
index 00000000000..bdff17d6cc0
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/_common/common.runtime.properties
@@ -0,0 +1,140 @@
+#
+# Licensed to Metamarkets Group Inc. (Metamarkets) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. Metamarkets licenses this file
+# to you 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 at
+#
+# 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.
+#
+
+# Extensions specified in the load list will be loaded by Druid
+# We are using local fs for deep storage - not recommended for production - use S3, HDFS, or NFS instead
+# We are using local derby for the metadata store - not recommended for production - use MySQL or Postgres instead
+
+# If you specify `druid.extensions.loadList=[]`, Druid won't load any extension from file system.
+# If you don't specify `druid.extensions.loadList`, Druid will load all the extensions under root extension directory.
+# More info: http://druid.io/docs/latest/operations/including-extensions.html
+druid.extensions.loadList=["druid-hdfs-storage", "druid-kafka-indexing-service"]
+
+# If you have a different version of Hadoop, place your Hadoop client jar files in your hadoop-dependencies directory
+# and uncomment the line below to point to your directory.
+#druid.extensions.hadoopDependenciesDir=/my/dir/hadoop-dependencies
+
+
+#
+# Hostname
+#
+druid.host=localhost
+
+#
+# Logging
+#
+
+# Log all runtime properties on startup. Disable to avoid logging properties on startup:
+druid.startup.logging.logProperties=true
+
+#
+# Zookeeper
+#
+
+druid.zk.service.host=localhost
+druid.zk.paths.base=/druid
+
+#
+# Metadata storage
+#
+
+# For Derby server on your Druid Coordinator (only viable in a cluster with a single Coordinator, no fail-over):
+druid.metadata.storage.type=derby
+druid.metadata.storage.connector.connectURI=jdbc:derby://localhost:1527/var/druid/metadata.db;create=true
+druid.metadata.storage.connector.host=localhost
+druid.metadata.storage.connector.port=1527
+
+# For MySQL:
+#druid.metadata.storage.type=mysql
+#druid.metadata.storage.connector.connectURI=jdbc:mysql://db.example.com:3306/druid
+#druid.metadata.storage.connector.user=...
+#druid.metadata.storage.connector.password=...
+
+# For PostgreSQL:
+#druid.metadata.storage.type=postgresql
+#druid.metadata.storage.connector.connectURI=jdbc:postgresql://db.example.com:5432/druid
+#druid.metadata.storage.connector.user=...
+#druid.metadata.storage.connector.password=...
+
+#
+# Deep storage
+#
+
+# For local disk (only viable in a cluster if this is a network mount):
+druid.storage.type=local
+druid.storage.storageDirectory=var/druid/segments
+
+# For HDFS:
+#druid.storage.type=hdfs
+#druid.storage.storageDirectory=/druid/segments
+
+# For S3:
+#druid.storage.type=s3
+#druid.storage.bucket=your-bucket
+#druid.storage.baseKey=druid/segments
+#druid.s3.accessKey=...
+#druid.s3.secretKey=...
+
+#
+# Indexing service logs
+#
+
+# For local disk (only viable in a cluster if this is a network mount):
+druid.indexer.logs.type=file
+druid.indexer.logs.directory=var/druid/indexing-logs
+
+# For HDFS:
+#druid.indexer.logs.type=hdfs
+#druid.indexer.logs.directory=/druid/indexing-logs
+
+# For S3:
+#druid.indexer.logs.type=s3
+#druid.indexer.logs.s3Bucket=your-bucket
+#druid.indexer.logs.s3Prefix=druid/indexing-logs
+
+#
+# Service discovery
+#
+
+druid.selectors.indexing.serviceName=druid/overlord
+druid.selectors.coordinator.serviceName=druid/coordinator
+
+#
+# Monitoring
+#
+
+druid.monitoring.monitors=["io.druid.java.util.metrics.JvmMonitor"]
+druid.emitter=logging
+druid.emitter.logging.logLevel=info
+
+# Storage type of double columns
+# ommiting this will lead to index double as float at the storage layer
+
+druid.indexing.doubleStorage=double
+
+#
+# Security
+#
+druid.server.hiddenProperties=["druid.s3.accessKey","druid.s3.secretKey","druid.metadata.storage.connector.password"]
+
+
+#
+# SQL
+#
+druid.sql.enable=true
diff --git a/examples/quickstart/tutorial/examples/conf/druid/_common/hadoop-xml/dummyfile b/examples/quickstart/tutorial/examples/conf/druid/_common/hadoop-xml/dummyfile
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/examples/quickstart/tutorial/examples/conf/druid/_common/log4j2.xml b/examples/quickstart/tutorial/examples/conf/druid/_common/log4j2.xml
new file mode 100644
index 00000000000..a60ebda9eb4
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/_common/log4j2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ Licensed to Metamarkets Group Inc. (Metamarkets) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. Metamarkets licenses this file
+ ~ to you 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 at
+ ~
+ ~ 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.
+-->
+
+<Configuration status="WARN">
+    <Appenders>
+        <Console name="Console" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d{ISO8601} %p [%t] %c - %m%n"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Root level="info">
+            <AppenderRef ref="Console"/>
+        </Root>
+    </Loggers>
+</Configuration>
+
diff --git a/examples/quickstart/tutorial/examples/conf/druid/broker/jvm.config b/examples/quickstart/tutorial/examples/conf/druid/broker/jvm.config
new file mode 100644
index 00000000000..608aa35f84f
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/broker/jvm.config
@@ -0,0 +1,8 @@
+-server
+-Xms1g
+-Xmx1g
+-XX:MaxDirectMemorySize=1792m
+-Duser.timezone=UTC
+-Dfile.encoding=UTF-8
+-Djava.io.tmpdir=var/tmp
+-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
diff --git a/examples/quickstart/tutorial/examples/conf/druid/broker/main.config b/examples/quickstart/tutorial/examples/conf/druid/broker/main.config
new file mode 100644
index 00000000000..de21e417fa1
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/broker/main.config
@@ -0,0 +1 @@
+io.druid.cli.Main server broker
diff --git a/examples/quickstart/tutorial/examples/conf/druid/broker/runtime.properties b/examples/quickstart/tutorial/examples/conf/druid/broker/runtime.properties
new file mode 100644
index 00000000000..bb2aababe54
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/broker/runtime.properties
@@ -0,0 +1,16 @@
+druid.service=druid/broker
+druid.port=8082
+
+# HTTP server threads
+druid.broker.http.numConnections=5
+druid.server.http.numThreads=9
+
+# Processing threads and buffers
+druid.processing.buffer.sizeBytes=256000000
+druid.processing.numThreads=2
+
+# Query cache (we use a small local cache)
+druid.broker.cache.useCache=true
+druid.broker.cache.populateCache=true
+druid.cache.type=local
+druid.cache.sizeInBytes=10000000
diff --git a/examples/quickstart/tutorial/examples/conf/druid/coordinator/jvm.config b/examples/quickstart/tutorial/examples/conf/druid/coordinator/jvm.config
new file mode 100644
index 00000000000..66aa951e81c
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/coordinator/jvm.config
@@ -0,0 +1,8 @@
+-server
+-Xms256m
+-Xmx256m
+-Duser.timezone=UTC
+-Dfile.encoding=UTF-8
+-Djava.io.tmpdir=var/tmp
+-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
+-Dderby.stream.error.file=var/druid/derby.log
diff --git a/examples/quickstart/tutorial/examples/conf/druid/coordinator/main.config b/examples/quickstart/tutorial/examples/conf/druid/coordinator/main.config
new file mode 100644
index 00000000000..e8e6ed91e7b
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/coordinator/main.config
@@ -0,0 +1 @@
+io.druid.cli.Main server coordinator
diff --git a/examples/quickstart/tutorial/examples/conf/druid/coordinator/runtime.properties b/examples/quickstart/tutorial/examples/conf/druid/coordinator/runtime.properties
new file mode 100644
index 00000000000..a61482f2a0f
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/coordinator/runtime.properties
@@ -0,0 +1,5 @@
+druid.service=druid/coordinator
+druid.port=8081
+
+druid.coordinator.startDelay=PT10S
+druid.coordinator.period=PT5S
diff --git a/examples/quickstart/tutorial/examples/conf/druid/historical/jvm.config b/examples/quickstart/tutorial/examples/conf/druid/historical/jvm.config
new file mode 100644
index 00000000000..430209ec98e
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/historical/jvm.config
@@ -0,0 +1,8 @@
+-server
+-Xms1g
+-Xmx1g
+-XX:MaxDirectMemorySize=1280m
+-Duser.timezone=UTC
+-Dfile.encoding=UTF-8
+-Djava.io.tmpdir=var/tmp
+-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
diff --git a/examples/quickstart/tutorial/examples/conf/druid/historical/main.config b/examples/quickstart/tutorial/examples/conf/druid/historical/main.config
new file mode 100644
index 00000000000..1a7749356c4
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/historical/main.config
@@ -0,0 +1 @@
+io.druid.cli.Main server historical
diff --git a/examples/quickstart/tutorial/examples/conf/druid/historical/runtime.properties b/examples/quickstart/tutorial/examples/conf/druid/historical/runtime.properties
new file mode 100644
index 00000000000..af900e8fbd5
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/historical/runtime.properties
@@ -0,0 +1,13 @@
+druid.service=druid/historical
+druid.port=8083
+
+# HTTP server threads
+druid.server.http.numThreads=9
+
+# Processing threads and buffers
+druid.processing.buffer.sizeBytes=256000000
+druid.processing.numThreads=2
+
+# Segment storage
+druid.segmentCache.locations=[{"path":"var/druid/segment-cache","maxSize":300000000000}]
+druid.server.maxSize=300000000000
diff --git a/examples/quickstart/tutorial/examples/conf/druid/middleManager/jvm.config b/examples/quickstart/tutorial/examples/conf/druid/middleManager/jvm.config
new file mode 100644
index 00000000000..7b9f1a47b55
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/middleManager/jvm.config
@@ -0,0 +1,7 @@
+-server
+-Xms64m
+-Xmx64m
+-Duser.timezone=UTC
+-Dfile.encoding=UTF-8
+-Djava.io.tmpdir=var/tmp
+-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
diff --git a/examples/quickstart/tutorial/examples/conf/druid/middleManager/main.config b/examples/quickstart/tutorial/examples/conf/druid/middleManager/main.config
new file mode 100644
index 00000000000..aa70653e6a2
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/middleManager/main.config
@@ -0,0 +1 @@
+io.druid.cli.Main server middleManager
diff --git a/examples/quickstart/tutorial/examples/conf/druid/middleManager/runtime.properties b/examples/quickstart/tutorial/examples/conf/druid/middleManager/runtime.properties
new file mode 100644
index 00000000000..fcfb974603f
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/middleManager/runtime.properties
@@ -0,0 +1,19 @@
+druid.service=druid/middleManager
+druid.port=8091
+
+# Number of tasks per middleManager
+druid.worker.capacity=3
+
+# Task launch parameters
+druid.indexer.runner.javaOpts=-server -Xmx2g -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
+druid.indexer.task.baseTaskDir=var/druid/task
+
+# HTTP server threads
+druid.server.http.numThreads=9
+
+# Processing threads and buffers on Peons
+druid.indexer.fork.property.druid.processing.buffer.sizeBytes=256000000
+druid.indexer.fork.property.druid.processing.numThreads=2
+
+# Hadoop indexing
+druid.indexer.task.hadoopWorkingPath=var/druid/hadoop-tmp
diff --git a/examples/quickstart/tutorial/examples/conf/druid/overlord/jvm.config b/examples/quickstart/tutorial/examples/conf/druid/overlord/jvm.config
new file mode 100644
index 00000000000..90526a53804
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/overlord/jvm.config
@@ -0,0 +1,7 @@
+-server
+-Xms256m
+-Xmx256m
+-Duser.timezone=UTC
+-Dfile.encoding=UTF-8
+-Djava.io.tmpdir=var/tmp
+-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
diff --git a/examples/quickstart/tutorial/examples/conf/druid/overlord/main.config b/examples/quickstart/tutorial/examples/conf/druid/overlord/main.config
new file mode 100644
index 00000000000..af7eda05b38
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/overlord/main.config
@@ -0,0 +1 @@
+io.druid.cli.Main server overlord
diff --git a/examples/quickstart/tutorial/examples/conf/druid/overlord/runtime.properties b/examples/quickstart/tutorial/examples/conf/druid/overlord/runtime.properties
new file mode 100644
index 00000000000..7ab544ad936
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/druid/overlord/runtime.properties
@@ -0,0 +1,7 @@
+druid.service=druid/overlord
+druid.port=8090
+
+druid.indexer.queue.startDelay=PT5S
+
+druid.indexer.runner.type=remote
+druid.indexer.storage.type=metadata
diff --git a/examples/quickstart/tutorial/examples/conf/tranquility/wikipedia-server.json b/examples/quickstart/tutorial/examples/conf/tranquility/wikipedia-server.json
new file mode 100644
index 00000000000..0895cab1e62
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/tranquility/wikipedia-server.json
@@ -0,0 +1,84 @@
+{
+  "dataSources" : {
+    "wikipedia" : {
+      "spec" : {
+        "dataSchema" : {
+          "dataSource" : "wikipedia",
+          "parser" : {
+            "type" : "string",
+            "parseSpec" : {
+              "format" : "json",
+              "dimensionsSpec" : {
+                "dimensions" : [
+                  "channel",
+                  "cityName",
+                  "comment",
+                  "countryIsoCode",
+                  "countryName",
+                  "isAnonymous",
+                  "isMinor",
+                  "isNew",
+                  "isRobot",
+                  "isUnpatrolled",
+                  "metroCode",
+                  "namespace",
+                  "page",
+                  "regionIsoCode",
+                  "regionName",
+                  "user"
+                ]
+              },
+              "timestampSpec": {
+                "column": "time",
+                "format": "iso"
+              }
+            }
+          },
+          "metricsSpec" : [
+            {
+              "name" : "added",
+              "type" : "longSum",
+              "fieldName" : "added"
+            },
+            {
+              "name" : "deleted",
+              "type" : "longSum",
+              "fieldName" : "deleted"
+            },
+            {
+              "name" : "delta",
+              "type" : "longSum",
+              "fieldName" : "delta"
+            }
+          ],
+          "granularitySpec" : {
+            "type" : "uniform",
+            "segmentGranularity" : "day",
+            "queryGranularity" : "none",
+            "intervals" : ["2015-09-12/2015-09-13"],
+            "rollup" : false
+          }
+        },
+        "ioConfig" : {
+          "type" : "realtime"
+        },
+        "tuningConfig" : {
+          "type" : "realtime",
+          "intermediatePersistPeriod" : "PT10M",
+          "windowPeriod" : "P3650D"
+        }
+      },
+      "properties" : {
+        "task.partitions" : "1",
+        "task.replicants" : "1"
+      }
+    }
+  },
+  "properties" : {
+    "zookeeper.connect" : "localhost",
+    "druid.discovery.curator.path" : "/druid/discovery",
+    "druid.selectors.indexing.serviceName" : "druid/overlord",
+    "http.port" : "8200",
+    "http.threads" : "9"
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/conf/tutorial-cluster.conf b/examples/quickstart/tutorial/examples/conf/tutorial-cluster.conf
new file mode 100644
index 00000000000..c1316cc5ba5
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/tutorial-cluster.conf
@@ -0,0 +1,13 @@
+:verify bin/verify-java
+:verify bin/verify-default-ports
+:kill-timeout 10
+
+!p10 zk bin/run-zk quickstart/tutorial/conf
+coordinator bin/run-druid coordinator quickstart/tutorial/conf
+broker bin/run-druid broker quickstart/tutorial/conf
+historical bin/run-druid historical quickstart/tutorial/conf
+!p80 overlord bin/run-druid overlord quickstart/tutorial/conf
+!p90 middleManager bin/run-druid middleManager quickstart/tutorial/conf
+
+# Uncomment to use Tranquility Server
+#!p95 tranquility-server tranquility/bin/tranquility server -configFile quickstart/tutorial/conf/tranquility/wikipedia-server.json -Ddruid.extensions.loadList=[]
diff --git a/examples/quickstart/tutorial/examples/conf/zk/jvm.config b/examples/quickstart/tutorial/examples/conf/zk/jvm.config
new file mode 100644
index 00000000000..3f2906d463f
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/zk/jvm.config
@@ -0,0 +1,4 @@
+-server
+-Xms128m
+-Xmx128m
+-Duser.timezone=UTC
diff --git a/examples/quickstart/tutorial/examples/conf/zk/log4j.xml b/examples/quickstart/tutorial/examples/conf/zk/log4j.xml
new file mode 100644
index 00000000000..5ed9b01bdc8
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/zk/log4j.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+  <appender name="console" class="org.apache.log4j.ConsoleAppender"> 
+    <param name="Target" value="System.out"/> 
+    <layout class="org.apache.log4j.PatternLayout"> 
+      <param name="ConversionPattern" value="%d{ISO8601} %p [%t] %c - %m%n"/> 
+    </layout>
+  </appender> 
+
+  <root> 
+    <priority value ="info" /> 
+    <appender-ref ref="console" /> 
+  </root>
+  
+</log4j:configuration>
diff --git a/examples/quickstart/tutorial/examples/conf/zk/zoo.cfg b/examples/quickstart/tutorial/examples/conf/zk/zoo.cfg
new file mode 100644
index 00000000000..72e57e67d27
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/conf/zk/zoo.cfg
@@ -0,0 +1,16 @@
+#
+# Server
+#
+
+tickTime=2000
+dataDir=var/zk
+clientPort=2181
+initLimit=5
+syncLimit=2
+
+#
+# Autopurge
+#
+
+autopurge.snapRetainCount=5
+autopurge.purgeInterval=1
diff --git a/examples/quickstart/tutorial/examples/deletion-index.json b/examples/quickstart/tutorial/examples/deletion-index.json
new file mode 100644
index 00000000000..7f2f60af63f
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/deletion-index.json
@@ -0,0 +1,64 @@
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "deletion-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "channel",
+              "cityName",
+              "comment",
+              "countryIsoCode",
+              "countryName",
+              "isAnonymous",
+              "isMinor",
+              "isNew",
+              "isRobot",
+              "isUnpatrolled",
+              "metroCode",
+              "namespace",
+              "page",
+              "regionIsoCode",
+              "regionName",
+              "user",
+              { "name": "added", "type": "long" },
+              { "name": "deleted", "type": "long" },
+              { "name": "delta", "type": "long" }
+            ]
+          },
+          "timestampSpec": {
+            "column": "time",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "hour",
+        "queryGranularity" : "none",
+        "intervals" : ["2015-09-12/2015-09-13"],
+        "rollup" : false
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "quickstart/",
+        "filter" : "wikiticker-2015-09-12-sampled.json.gz"
+      },
+      "appendToExisting" : false
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/deletion-kill.json b/examples/quickstart/tutorial/examples/deletion-kill.json
new file mode 100644
index 00000000000..c160a7c6632
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/deletion-kill.json
@@ -0,0 +1,5 @@
+{
+  "type": "kill",
+  "dataSource": "deletion-tutorial",
+  "interval" : "2015-09-12/2015-09-13"
+}
diff --git a/examples/quickstart/tutorial/examples/hadoop/docker/Dockerfile b/examples/quickstart/tutorial/examples/hadoop/docker/Dockerfile
new file mode 100644
index 00000000000..dbbd72240f7
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/hadoop/docker/Dockerfile
@@ -0,0 +1,107 @@
+# Creates pseudo distributed hadoop 2.7.3 with java 8
+#
+# Modified from the SequenceIQ Dockerfiles at https://github.com/sequenceiq/hadoop-docker
+#
+# docker build -t druid-hadoop-demo:2.7.3 .
+
+FROM sequenceiq/pam:centos-6.5
+MAINTAINER SequenceIQ
+
+USER root
+
+# install dev tools
+RUN yum clean all \
+    && rpm --rebuilddb \
+    && yum install -y curl which tar sudo openssh-server openssh-clients rsync yum-plugin-ovl\
+    && yum clean all \
+    && yum update -y libselinux \
+    && yum clean all
+# update libselinux. see https://github.com/sequenceiq/hadoop-docker/issues/14
+
+# passwordless ssh
+RUN ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key
+RUN ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key
+RUN ssh-keygen -q -N "" -t rsa -f /root/.ssh/id_rsa
+RUN cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
+
+# zulu java 8
+RUN rpm --import http://repos.azulsystems.com/RPM-GPG-KEY-azulsystems
+RUN rpm --rebuilddb
+RUN sudo curl -o /etc/yum.repos.d/zulu.repo http://repos.azulsystems.com/rhel/zulu.repo
+RUN yum install -y zulu-8
+
+ENV JAVA_HOME /usr/lib/jvm/zulu-8
+ENV PATH $PATH:$JAVA_HOME/bin
+
+# hadoop
+RUN curl -s https://archive.apache.org/dist/hadoop/core/hadoop-2.7.3/hadoop-2.7.3.tar.gz | tar -xz -C /usr/local/
+RUN cd /usr/local && ln -s ./hadoop-2.7.3 hadoop
+
+ENV HADOOP_PREFIX /usr/local/hadoop
+ENV HADOOP_COMMON_HOME /usr/local/hadoop
+ENV HADOOP_HDFS_HOME /usr/local/hadoop
+ENV HADOOP_MAPRED_HOME /usr/local/hadoop
+ENV HADOOP_YARN_HOME /usr/local/hadoop
+ENV HADOOP_CONF_DIR /usr/local/hadoop/etc/hadoop
+ENV YARN_CONF_DIR $HADOOP_PREFIX/etc/hadoop
+
+RUN sed -i '/^export JAVA_HOME/ s:.*:export JAVA_HOME=/usr/lib/jvm/zulu-8\nexport HADOOP_PREFIX=/usr/local/hadoop\nexport HADOOP_HOME=/usr/local/hadoop\n:' $HADOOP_PREFIX/etc/hadoop/hadoop-env.sh
+RUN sed -i '/^export HADOOP_CONF_DIR/ s:.*:export HADOOP_CONF_DIR=/usr/local/hadoop/etc/hadoop/:' $HADOOP_PREFIX/etc/hadoop/hadoop-env.sh
+
+RUN mkdir $HADOOP_PREFIX/input
+RUN cp $HADOOP_PREFIX/etc/hadoop/*.xml $HADOOP_PREFIX/input
+
+# pseudo distributed
+ADD core-site.xml.template $HADOOP_PREFIX/etc/hadoop/core-site.xml.template
+RUN sed s/HOSTNAME/localhost/ /usr/local/hadoop/etc/hadoop/core-site.xml.template > /usr/local/hadoop/etc/hadoop/core-site.xml
+ADD hdfs-site.xml $HADOOP_PREFIX/etc/hadoop/hdfs-site.xml
+
+ADD mapred-site.xml $HADOOP_PREFIX/etc/hadoop/mapred-site.xml
+ADD yarn-site.xml $HADOOP_PREFIX/etc/hadoop/yarn-site.xml
+
+RUN $HADOOP_PREFIX/bin/hdfs namenode -format
+
+ADD ssh_config /root/.ssh/config
+RUN chmod 600 /root/.ssh/config
+RUN chown root:root /root/.ssh/config
+
+# # installing supervisord
+# RUN yum install -y python-setuptools
+# RUN easy_install pip
+# RUN curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -o - | python
+# RUN pip install supervisor
+#
+# ADD supervisord.conf /etc/supervisord.conf
+
+ADD bootstrap.sh /etc/bootstrap.sh
+RUN chown root:root /etc/bootstrap.sh
+RUN chmod 700 /etc/bootstrap.sh
+
+ENV BOOTSTRAP /etc/bootstrap.sh
+
+# workingaround docker.io build error
+RUN ls -la /usr/local/hadoop/etc/hadoop/*-env.sh
+RUN chmod +x /usr/local/hadoop/etc/hadoop/*-env.sh
+RUN ls -la /usr/local/hadoop/etc/hadoop/*-env.sh
+
+# Copy additional .jars to classpath
+RUN cp /usr/local/hadoop/share/hadoop/tools/lib/*.jar /usr/local/hadoop/share/hadoop/common/lib/
+
+# fix the 254 error code
+RUN sed  -i "/^[^#]*UsePAM/ s/.*/#&/"  /etc/ssh/sshd_config
+RUN echo "UsePAM no" >> /etc/ssh/sshd_config
+RUN echo "Port 2122" >> /etc/ssh/sshd_config
+
+RUN service sshd start && $HADOOP_PREFIX/etc/hadoop/hadoop-env.sh && $HADOOP_PREFIX/sbin/start-dfs.sh && $HADOOP_PREFIX/bin/hdfs dfs -mkdir -p /user/root
+RUN service sshd start && $HADOOP_PREFIX/etc/hadoop/hadoop-env.sh && $HADOOP_PREFIX/sbin/start-dfs.sh && $HADOOP_PREFIX/bin/hdfs dfs -put $HADOOP_PREFIX/etc/hadoop/ input
+
+CMD ["/etc/bootstrap.sh", "-d"]
+
+# Hdfs ports
+EXPOSE 50010 50020 50070 50075 50090 8020 9000
+# Mapred ports
+EXPOSE 10020 19888
+#Yarn ports
+EXPOSE 8030 8031 8032 8033 8040 8042 8088
+#Other ports
+EXPOSE 49707 2122
diff --git a/examples/quickstart/tutorial/examples/hadoop/docker/LICENSE b/examples/quickstart/tutorial/examples/hadoop/docker/LICENSE
new file mode 100644
index 00000000000..4f4964bf3f3
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/hadoop/docker/LICENSE
@@ -0,0 +1,1331 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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 at
+
+       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.
+
+
+Apache Knox Subcomponents (binary distributions):
+
+Apache Knox includes a number of sub-components with separate copyright
+notices and license terms.  Your use of these sub-components is subject
+to the terms and conditions of the following licenses.
+
+------------------------------------------------------------------------------
+From Jetty and Jerico
+------------------------------------------------------------------------------
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and such
+derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the
+Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to
+its Contributions set forth herein, no assurances are provided by any
+Contributor that the Program does not infringe the patent or other intellectual
+property rights of any other entity. Each Contributor disclaims any liability to
+Recipient for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to exercising the
+rights and licenses granted hereunder, each Recipient hereby assumes sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire that license
+before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its
+own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title and
+non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by
+that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor,
+and informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its exercise of
+rights under this Agreement , including but not limited to the risks and costs
+of program errors, compliance with applicable laws, damage to or loss of data,
+programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+(excluding combinations of the Program with other software or hardware)
+infringes such Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue and
+survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation
+may assign the responsibility to serve as the Agreement Steward to a suitable
+separate entity. Each new version of the Agreement will be given a
+distinguishing version number. The Program (including Contributions) may always
+be distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is published,
+Contributor may elect to distribute the Program (including its Contributions)
+under the new version. Except as expressly stated in Sections 2(a) and 2(b)
+above, Recipient receives no rights or licenses to the intellectual property of
+any Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted under
+this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
+
+
+For TODO.jar (Jave EE Servlet API)
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+   1.1. Contributor. means each individual or entity that creates or contributes
+        to the creation of Modifications.
+
+   1.2. Contributor Version. means the combination of the Original Software,
+        prior Modifications used by a Contributor (if any), and the
+        Modifications made by that particular Contributor.
+
+   1.3. Covered Software. means (a) the Original Software, or (b) Modifications,
+        or (c) the combination of files containing Original Software with files
+        containing Modifications, in each case including portions thereof.
+
+   1.4. Executable. means the Covered Software in any form other than Source
+        Code.
+
+   1.5. Initial Developer. means the individual or entity that first makes
+        Original Software available under this License.
+
+   1.6. Larger Work. means a work which combines Covered Software or portions
+        thereof with code not governed by the terms of this License.
+
+   1.7. License. means this document.
+
+   1.8. Licensable. means having the right to grant, to the maximum extent
+        possible, whether at the time of the initial grant or subsequently
+        acquired, any and all of the rights conveyed herein.
+
+   1.9. Modifications. means the Source Code and Executable form of any of the
+        following:
+
+        A. Any file that results from an addition to, deletion from or
+           modification of the contents of a file containing Original Software
+           or previous Modifications;
+
+        B. Any new file that contains any part of the Original Software or
+           previous Modification; or
+
+        C. Any new file that is contributed or otherwise made available under
+           the terms of this License.
+
+   1.10. Original Software. means the Source Code and Executable form of
+         computer software code that is originally released under this License.
+
+   1.11. Patent Claims. means any patent claim(s), now owned or hereafter
+         acquired, including without limitation, method, process, and apparatus
+         claims, in any patent Licensable by grantor.
+
+   1.12. Source Code. means (a) the common form of computer software code in
+         which modifications are made and (b) associated documentation included
+         in or with such code.
+
+   1.13. You. (or .Your.) means an individual or a legal entity exercising
+         rights under, and complying with all of the terms of, this License. For
+         legal entities, .You. includes any entity which controls, is controlled
+         by, or is under common control with You. For purposes of this
+         definition, .control. means (a) the power, direct or indirect, to cause
+         the direction or management of such entity, whether by contract or
+         otherwise, or (b) ownership of more than fifty percent (50%) of the
+         outstanding shares or beneficial ownership of such entity.
+
+2. License Grants.
+
+      2.1. The Initial Developer Grant.
+
+      Conditioned upon Your compliance with Section 3.1 below and subject to
+      third party intellectual property claims, the Initial Developer hereby
+      grants You a world-wide, royalty-free, non-exclusive license:
+
+        (a) under intellectual property rights (other than patent or trademark)
+            Licensable by Initial Developer, to use, reproduce, modify, display,
+            perform, sublicense and distribute the Original Software (or
+            portions thereof), with or without Modifications, and/or as part of
+            a Larger Work; and
+
+        (b) under Patent Claims infringed by the making, using or selling of
+            Original Software, to make, have made, use, practice, sell, and
+            offer for sale, and/or otherwise dispose of the Original Software
+            (or portions thereof).
+
+        (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
+            date Initial Developer first distributes or otherwise makes the
+            Original Software available to a third party under the terms of this
+            License.
+
+        (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
+            (1) for code that You delete from the Original Software, or (2) for
+            infringements caused by: (i) the modification of the Original
+            Software, or (ii) the combination of the Original Software with
+            other software or devices.
+
+    2.2. Contributor Grant.
+
+    Conditioned upon Your compliance with Section 3.1 below and subject to third
+    party intellectual property claims, each Contributor hereby grants You a
+    world-wide, royalty-free, non-exclusive license:
+
+        (a) under intellectual property rights (other than patent or trademark)
+            Licensable by Contributor to use, reproduce, modify, display,
+            perform, sublicense and distribute the Modifications created by such
+            Contributor (or portions thereof), either on an unmodified basis,
+            with other Modifications, as Covered Software and/or as part of a
+            Larger Work; and
+
+        (b) under Patent Claims infringed by the making, using, or selling of
+            Modifications made by that Contributor either alone and/or in
+            combination with its Contributor Version (or portions of such
+            combination), to make, use, sell, offer for sale, have made, and/or
+            otherwise dispose of: (1) Modifications made by that Contributor (or
+            portions thereof); and (2) the combination of Modifications made by
+            that Contributor with its Contributor Version (or portions of such
+            combination).
+
+        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
+            the date Contributor first distributes or otherwise makes the
+            Modifications available to a third party.
+
+        (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
+            (1) for any code that Contributor has deleted from the Contributor
+            Version; (2) for infringements caused by: (i) third party
+            modifications of Contributor Version, or (ii) the combination of
+            Modifications made by that Contributor with other software (except
+            as part of the Contributor Version) or other devices; or (3) under
+            Patent Claims infringed by Covered Software in the absence of
+            Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+      3.1. Availability of Source Code.
+      Any Covered Software that You distribute or otherwise make available in
+      Executable form must also be made available in Source Code form and that
+      Source Code form must be distributed only under the terms of this License.
+      You must include a copy of this License with every copy of the Source Code
+      form of the Covered Software You distribute or otherwise make available.
+      You must inform recipients of any such Covered Software in Executable form
+      as to how they can obtain such Covered Software in Source Code form in a
+      reasonable manner on or through a medium customarily used for software
+      exchange.
+
+      3.2. Modifications.
+      The Modifications that You create or to which You contribute are governed
+      by the terms of this License. You represent that You believe Your
+      Modifications are Your original creation(s) and/or You have sufficient
+      rights to grant the rights conveyed by this License.
+
+      3.3. Required Notices.
+      You must include a notice in each of Your Modifications that identifies
+      You as the Contributor of the Modification. You may not remove or alter
+      any copyright, patent or trademark notices contained within the Covered
+      Software, or any notices of licensing or any descriptive text giving
+      attribution to any Contributor or the Initial Developer.
+
+      3.4. Application of Additional Terms.
+      You may not offer or impose any terms on any Covered Software in Source
+      Code form that alters or restricts the applicable version of this License
+      or the recipients. rights hereunder. You may choose to offer, and to
+      charge a fee for, warranty, support, indemnity or liability obligations to
+      one or more recipients of Covered Software. However, you may do so only on
+      Your own behalf, and not on behalf of the Initial Developer or any
+      Contributor. You must make it absolutely clear that any such warranty,
+      support, indemnity or liability obligation is offered by You alone, and
+      You hereby agree to indemnify the Initial Developer and every Contributor
+      for any liability incurred by the Initial Developer or such Contributor as
+      a result of warranty, support, indemnity or liability terms You offer.
+
+      3.5. Distribution of Executable Versions.
+      You may distribute the Executable form of the Covered Software under the
+      terms of this License or under the terms of a license of Your choice,
+      which may contain terms different from this License, provided that You are
+      in compliance with the terms of this License and that the license for the
+      Executable form does not attempt to limit or alter the recipient.s rights
+      in the Source Code form from the rights set forth in this License. If You
+      distribute the Covered Software in Executable form under a different
+      license, You must make it absolutely clear that any terms which differ
+      from this License are offered by You alone, not by the Initial Developer
+      or Contributor. You hereby agree to indemnify the Initial Developer and
+      every Contributor for any liability incurred by the Initial Developer or
+      such Contributor as a result of any such terms You offer.
+
+      3.6. Larger Works.
+      You may create a Larger Work by combining Covered Software with other code
+      not governed by the terms of this License and distribute the Larger Work
+      as a single product. In such a case, You must make sure the requirements
+      of this License are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+      4.1. New Versions.
+      Sun Microsystems, Inc. is the initial license steward and may publish
+      revised and/or new versions of this License from time to time. Each
+      version will be given a distinguishing version number. Except as provided
+      in Section 4.3, no one other than the license steward has the right to
+      modify this License.
+
+      4.2. Effect of New Versions.
+      You may always continue to use, distribute or otherwise make the Covered
+      Software available under the terms of the version of the License under
+      which You originally received the Covered Software. If the Initial
+      Developer includes a notice in the Original Software prohibiting it from
+      being distributed or otherwise made available under any subsequent version
+      of the License, You must distribute and make the Covered Software
+      available under the terms of the version of the License under which You
+      originally received the Covered Software. Otherwise, You may also choose
+      to use, distribute or otherwise make the Covered Software available under
+      the terms of any subsequent version of the License published by the
+      license steward.
+
+      4.3. Modified Versions.
+      When You are an Initial Developer and You want to create a new license for
+      Your Original Software, You may create and use a modified version of this
+      License if You: (a) rename the license and remove any references to the
+      name of the license steward (except to note that the license differs from
+      this License); and (b) otherwise make it clear that the license contains
+      terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+   COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, WITHOUT
+   WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
+   LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS,
+   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK
+   AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD
+   ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL
+   DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
+   SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
+   ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED
+   HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION.
+
+      6.1. This License and the rights granted hereunder will terminate
+           automatically if You fail to comply with terms herein and fail to
+           cure such breach within 30 days of becoming aware of the breach.
+           Provisions which, by their nature, must remain in effect beyond the
+           termination of this License shall survive.
+
+      6.2. If You assert a patent infringement claim (excluding declaratory
+           judgment actions) against Initial Developer or a Contributor (the
+           Initial Developer or Contributor against whom You assert such claim
+           is referred to as .Participant.) alleging that the Participant
+           Software (meaning the Contributor Version where the Participant is a
+           Contributor or the Original Software where the Participant is the
+           Initial Developer) directly or indirectly infringes any patent, then
+           any and all rights granted directly or indirectly to You by such
+           Participant, the Initial Developer (if the Initial Developer is not
+           the Participant) and all Contributors under Sections 2.1 and/or 2.2
+           of this License shall, upon 60 days notice from Participant terminate
+           prospectively and automatically at the expiration of such 60 day
+           notice period, unless if within such 60 day period You withdraw Your
+           claim with respect to the Participant Software against such
+           Participant either unilaterally or pursuant to a written agreement
+           with Participant.
+
+      6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+           user licenses that have been validly granted by You or any
+           distributor hereunder prior to termination (excluding licenses
+           granted to You by any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+   UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+   NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+   OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF
+   ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+   INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+   LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+   COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR
+   LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF
+   SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR
+   DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY.S NEGLIGENCE TO THE EXTENT
+   APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+   EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS
+   EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+   The Covered Software is a .commercial item,. as that term is defined in 48
+   C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer software. (as
+   that term is defined at 48 C.F.R. ? 252.227-7014(a)(1)) and commercial
+   computer software documentation. as such terms are used in 48 C.F.R. 12.212
+   (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
+   through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered
+   Software with only those rights set forth herein. This U.S. Government Rights
+   clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or
+   provision that addresses Government rights in computer software under this
+   License.
+
+9. MISCELLANEOUS.
+
+   This License represents the complete agreement concerning subject matter
+   hereof. If any provision of this License is held to be unenforceable, such
+   provision shall be reformed only to the extent necessary to make it
+   enforceable. This License shall be governed by the law of the jurisdiction
+   specified in a notice contained within the Original Software (except to the
+   extent applicable law, if any, provides otherwise), excluding such
+   jurisdiction's conflict-of-law provisions. Any litigation relating to this
+   License shall be subject to the jurisdiction of the courts located in the
+   jurisdiction and venue specified in a notice contained within the Original
+   Software, with the losing party responsible for costs, including, without
+   limitation, court costs and reasonable attorneys. fees and expenses. The
+   application of the United Nations Convention on Contracts for the
+   International Sale of Goods is expressly excluded. Any law or regulation
+   which provides that the language of a contract shall be construed against
+   the drafter shall not apply to this License. You agree that You alone are
+   responsible for compliance with the United States export administration
+   regulations (and the export control laws and regulation of any other
+   countries) when You use, distribute or otherwise make available any Covered
+   Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+   As between Initial Developer and the Contributors, each party is responsible
+   for claims and damages arising, directly or indirectly, out of its
+   utilization of rights under this License and You agree to work with Initial
+   Developer and Contributors to distribute such responsibility on an equitable
+   basis. Nothing herein is intended or shall be deemed to constitute any
+   admission of liability.
+
+   NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
+   LICENSE (CDDL)
+
+   The code released under the CDDL shall be governed by the laws of the State
+   of California (excluding conflict-of-law provisions). Any litigation relating
+   to this License shall be subject to the jurisdiction of the Federal Courts of
+   the Northern District of California and the state courts of the State of
+   California, with venue lying in Santa Clara County, California.
+
+
+------------------------------------------------------------------------------
+ANTLR 2 License (from ApacheDS, Groovy)
+------------------------------------------------------------------------------
+We reserve no legal rights to the ANTLR--it is fully in the public domain.
+An individual or company may do whatever they wish with source code
+distributed with ANTLR or the code generated by ANTLR, including the
+incorporation of ANTLR, or its output, into commerical software.
+We encourage users to develop software with ANTLR. However, we do ask that
+credit is given to us for developing ANTLR. By "credit", we mean that if you
+use ANTLR or incorporate any source code into one of your programs
+(commercial product, research project, or otherwise) that you acknowledge
+this fact somewhere in the documentation, research report, etc... If you like
+ANTLR and have developed a nice tool with the output, please mention that you
+developed it using ANTLR. In addition, we ask that the headers remain intact
+in our source code. As long as these guidelines are kept, we expect to
+continue enhancing this system and expect to make other tools available as
+they are completed.
+
+------------------------------------------------------------------------------
+ASM Project License (from CGLib, Groovy)
+------------------------------------------------------------------------------
+Copyright (c) 2000-2011 INRIA, France Telecom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holders nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+
+------------------------------------------------------------------------------
+Bouncy Castle License (from ApacheDS)
+------------------------------------------------------------------------------
+Copyright (c) 2000 - 2012 The Legion Of The Bouncy Castle
+(http://www.bouncycastle.org)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+------------------------------------------------------------------------------
+Eclipse Public License - v1.0 (from Jetty/Jerico)
+------------------------------------------------------------------------------
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation
+   distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+
+i)changes to the Program, and
+
+ii)additions to the Program;
+
+where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from
+a Contributor if it was added to the Program by such Contributor itself or
+anyone acting on such Contributor’s behalf. Contributions do not include
+additions to the Program which: (i) are separate modules of software
+distributed in conjunction with the Program under their own license agreement,
+and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this
+Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants
+   Recipient a non-exclusive, worldwide, royalty-free copyright license to
+   reproduce, prepare derivative works of, publicly display, publicly perform,
+   distribute and sublicense the Contribution of such Contributor, if any,
+   and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants
+   Recipient a non-exclusive, worldwide, royalty-free patent license under
+   Licensed Patents to make, use, sell, offer to sell, import and otherwise
+   transfer the Contribution of such Contributor, if any, in source code and
+   object code form. This patent license shall apply to the combination of the
+   Contribution and the Program if, at the time the Contribution is added by
+   the Contributor, such addition of the Contribution causes such combination
+   to be covered by the Licensed Patents. The patent license shall not apply
+   to any other combinations which include the Contribution. No hardware per
+   se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses
+   to its Contributions set forth herein, no assurances are provided by any
+   Contributor that the Program does not infringe the patent or other
+   intellectual property rights of any other entity. Each Contributor
+   disclaims any liability to Recipient for claims brought by any other
+   entity based on infringement of intellectual property rights or otherwise.
+   As a condition to exercising the rights and licenses granted hereunder,
+   each Recipient hereby assumes sole responsibility to secure any other
+   intellectual property rights needed, if any. For example, if a third
+   party patent license is required to allow Recipient to distribute the
+   Program, it is Recipient’s responsibility to acquire that license before
+   distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient
+   copyright rights in its Contribution, if any, to grant the copyright
+   license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under
+its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and
+   conditions, express and implied, including warranties or conditions of
+   title and non-infringement, and implied warranties or conditions of
+   merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for
+    damages, including direct, indirect, special, incidental and consequential
+    damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by
+     that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such
+    Contributor, and informs licensees how to obtain it in a reasonable manner
+    on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within
+the Program.
+
+Each Contributor must identify itself as the originator of its Contribution,
+if any, in a manner that reasonably allows subsequent Recipients to identify
+the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore,
+if a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses,
+damages and costs (collectively "Losses") arising from claims, lawsuits and
+other legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such Commercial
+Contributor in connection with its distribution of the Program in a commercial
+product offering. The obligations in this section do not apply to any claims
+or Losses relating to any actual or alleged intellectual property infringement.
+In order to qualify, an Indemnified Contributor must: a) promptly notify the
+Commercial Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor in, the
+defense and any related settlement negotiations. The Indemnified Contributor
+may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If
+that Commercial Contributor then makes performance claims, or offers
+warranties related to Product X, those performance claims and warranties are
+such Commercial Contributor’s responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON
+AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS
+OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+Each Recipient is solely responsible for determining the appropriateness of
+using and distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to the
+risks and costs of program errors, compliance with applicable laws, damage to
+or loss of data, programs or equipment, and unavailability or interruption of
+operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
+LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of the
+remainder of the terms of this Agreement, and without further action by the
+parties hereto, such provision shall be reformed to the minimum extent
+necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+(excluding combinations of the Program with other software or hardware)
+infringes such Recipient’s patent(s), then such Recipient’s rights granted
+under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient’s rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and
+does not cure such failure in a reasonable period of time after becoming
+aware of such noncompliance. If all Recipient’s rights under this Agreement
+terminate, Recipient agrees to cease use and distribution of the Program as
+soon as reasonably practicable. However, Recipient’s obligations under this
+Agreement and any licenses granted by Recipient relating to the Program shall
+continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to
+time. No one other than the Agreement Steward has the right to modify this
+Agreement. The Eclipse Foundation is the initial Agreement Steward. The
+Eclipse Foundation may assign the responsibility to serve as the Agreement
+Steward to a suitable separate entity. Each new version of the Agreement
+will be given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly
+stated in Sections 2(a) and 2(b) above, Recipient receives no rights or
+licenses to the intellectual property of any Contributor under this Agreement,
+whether expressly, by implication, estoppel or otherwise. All rights in the
+Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial
+in any resulting litigation.
+
+
+--------------------------------------------------------------------------------------------------
+JDBM LICENSE v1.00 (from ApacheDS)
+--------------------------------------------------------------------------------------------------
+/**
+ * JDBM LICENSE v1.00
+ *
+ * Redistribution and use of this software and associated documentation
+ * ("Software"), with or without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain copyright
+ *    statements and notices.  Redistributions must also contain a
+ *    copy of this document.
+ *
+ * 2. Redistributions in binary form must reproduce the
+ *    above copyright notice, this list of conditions and the
+ *    following disclaimer in the documentation and/or other
+ *    materials provided with the distribution.
+ *
+ * 3. The name "JDBM" must not be used to endorse or promote
+ *    products derived from this Software without prior written
+ *    permission of Cees de Groot.  For written permission,
+ *    please contact cg@cdegroot.com.
+ *
+ * 4. Products derived from this Software may not be called "JDBM"
+ *    nor may "JDBM" appear in their names without prior written
+ *    permission of Cees de Groot.
+ *
+ * 5. Due credit should be given to the JDBM Project
+ *    (http://jdbm.sourceforge.net/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE JDBM PROJECT AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
+ * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+ * CEES DE GROOT OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Copyright 2000 (C) Cees de Groot. All Rights Reserved.
+ * Contributions are Copyright (C) 2000 by their associated contributors.
+ *
+ * $Id: LICENSE.txt,v 1.1 2000/05/05 23:59:52 boisvert Exp $
+ */
+
+------------------------------------------------------------------------------
+JLine License - BSD (from Groovy)
+------------------------------------------------------------------------------
+Copyright (c) 2002-2006, Marc Prud'hommeaux <mw...@cornell.edu>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the following
+conditions are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with
+the distribution.
+
+Neither the name of JLine nor the names of its contributors
+may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+------------------------------------------------------------------------------
+SL4J License - MIT
+------------------------------------------------------------------------------
+Copyright (c) 2004-2013 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+------------------------------------------------------------------------------
+Tanuki Software License (from ApacheDS)
+------------------------------------------------------------------------------
+Copyright (c) 1999, 2004 Tanuki Software
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of the Java Service Wrapper and associated
+documentation files (the "Software"), to deal in the Software
+without  restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sub-license,
+and/or sell copies of the Software, and to permit persons to
+whom the Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+
+------------------------------------------------------------------------------
+Silver Egg Technology License (from ApacheDS)
+------------------------------------------------------------------------------
+Portions of the Software have been derived from source code
+developed by Silver Egg Technology under the following license:
+
+Copyright (c) 2001 Silver Egg Technology
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sub-license, and/or
+sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+
+------------------------------------------------------------------------------
+Sun Microsystems, Inc. License (from Groovy)
+------------------------------------------------------------------------------
+The following notice applies to the files:
+
+src/main/org/codehaus/groovy/jsr223/GroovyCompiledScript.java
+src/main/org/codehaus/groovy/jsr223/GroovyScriptEngineFactory.java
+src/main/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java
+
+/*
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met: Redistributions of source code
+ * must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution. Neither the name of the Sun Microsystems nor the names of
+ * is contributors may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+------------------------------------------------------------------------------
+European Commission License (from Hadoop)
+------------------------------------------------------------------------------
+For the org.apache.hadoop.util.bloom.* classes:
+
+/**
+ *
+ * Copyright (c) 2005, European Commission project OneLab under contract
+ * 034819 (http://www.one-lab.org)
+ * All rights reserved.
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of the University Catholique de Louvain - UCL
+ *    nor the names of its contributors may be used to endorse or
+ *    promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+------------------------------------------------------------------------------
+zlib/libpng License
+------------------------------------------------------------------------------
+This software is provided 'as-is', without any express or implied warranty. In
+no event will the authors be held liable for any damages arising from the use of
+this software.
+
+Permission is granted to anyone to use this software for any purpose, including
+commercial applications, and to alter it and redistribute it freely, subject to
+the following restrictions:
+
+   1. The origin of this software must not be misrepresented; you must not claim
+       that you wrote the original software. If you use this software in a
+       product, an acknowledgment in the product documentation would be
+       appreciated but is not required.
+   2. Altered source versions must be plainly marked as such, and must not be
+       misrepresented as being the original software.
+   3. This notice may not be removed or altered from any source distribution.
+
+
+------------------------------------------------------------------------------
+bzip2 License
+------------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+   2. The origin of this software must not be misrepresented; you must not claim
+       that you wrote the original software. If you use this software in a
+       product, an acknowledgment in the product documentation would be
+       appreciated but is not required.
+   3. Altered source versions must be plainly marked as such, and must not be
+       misrepresented as being the original software.
+   4. The name of the author may not be used to endorse or promote products
+       derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGE.
+
+Julian Seward, Cambridge, UK.
+jseward@acm.org
diff --git a/examples/quickstart/tutorial/examples/hadoop/docker/bootstrap.sh b/examples/quickstart/tutorial/examples/hadoop/docker/bootstrap.sh
new file mode 100755
index 00000000000..4cf0e55b135
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/hadoop/docker/bootstrap.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+: ${HADOOP_PREFIX:=/usr/local/hadoop}
+
+$HADOOP_PREFIX/etc/hadoop/hadoop-env.sh
+
+rm /tmp/*.pid
+
+# installing libraries if any - (resource urls added comma separated to the ACP system variable)
+cd $HADOOP_PREFIX/share/hadoop/common ; for cp in ${ACP//,/ }; do  echo == $cp; curl -LO $cp ; done; cd -
+
+# altering the core-site configuration
+sed s/HOSTNAME/$HOSTNAME/ /usr/local/hadoop/etc/hadoop/core-site.xml.template > /usr/local/hadoop/etc/hadoop/core-site.xml
+
+
+service sshd start
+$HADOOP_PREFIX/sbin/start-dfs.sh
+$HADOOP_PREFIX/sbin/start-yarn.sh
+$HADOOP_PREFIX/sbin/mr-jobhistory-daemon.sh start historyserver
+
+if [[ $1 == "-d" ]]; then
+  while true; do sleep 1000; done
+fi
+
+if [[ $1 == "-bash" ]]; then
+  /bin/bash
+fi
diff --git a/examples/quickstart/tutorial/examples/hadoop/docker/core-site.xml.template b/examples/quickstart/tutorial/examples/hadoop/docker/core-site.xml.template
new file mode 100644
index 00000000000..00ab59528b8
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/hadoop/docker/core-site.xml.template
@@ -0,0 +1,6 @@
+  <configuration>
+      <property>
+          <name>fs.defaultFS</name>
+          <value>hdfs://HOSTNAME:9000</value>
+      </property>
+  </configuration>
diff --git a/examples/quickstart/tutorial/examples/hadoop/docker/hdfs-site.xml b/examples/quickstart/tutorial/examples/hadoop/docker/hdfs-site.xml
new file mode 100644
index 00000000000..d29556190ad
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/hadoop/docker/hdfs-site.xml
@@ -0,0 +1,14 @@
+<configuration>
+    <property>
+        <name>dfs.replication</name>
+        <value>1</value>
+    </property>
+    <property>
+        <name>dfs.client.use.datanode.hostname</name>
+        <value>true</value>
+    </property>
+    <property>
+        <name>dfs.datanode.use.datanode.hostname</name>
+        <value>true</value>
+    </property>
+</configuration>
diff --git a/examples/quickstart/tutorial/examples/hadoop/docker/mapred-site.xml b/examples/quickstart/tutorial/examples/hadoop/docker/mapred-site.xml
new file mode 100644
index 00000000000..dba582f1c31
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/hadoop/docker/mapred-site.xml
@@ -0,0 +1,6 @@
+<configuration>
+    <property>
+        <name>mapreduce.framework.name</name>
+        <value>yarn</value>
+    </property>
+</configuration>
diff --git a/examples/quickstart/tutorial/examples/hadoop/docker/ssh_config b/examples/quickstart/tutorial/examples/hadoop/docker/ssh_config
new file mode 100644
index 00000000000..535f9d32bd4
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/hadoop/docker/ssh_config
@@ -0,0 +1,5 @@
+Host *
+  UserKnownHostsFile /dev/null
+  StrictHostKeyChecking no
+  LogLevel quiet
+  Port 2122
diff --git a/examples/quickstart/tutorial/examples/hadoop/docker/yarn-site.xml b/examples/quickstart/tutorial/examples/hadoop/docker/yarn-site.xml
new file mode 100644
index 00000000000..becf69465f1
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/hadoop/docker/yarn-site.xml
@@ -0,0 +1,47 @@
+<configuration>
+    <property>
+        <name>yarn.nodemanager.aux-services</name>
+        <value>mapreduce_shuffle</value>
+    </property>
+
+    <property>
+      <name>yarn.application.classpath</name>
+      <value>/usr/local/hadoop/etc/hadoop, /usr/local/hadoop/share/hadoop/common/*, /usr/local/hadoop/share/hadoop/common/lib/*, /usr/local/hadoop/share/hadoop/hdfs/*, /usr/local/hadoop/share/hadoop/hdfs/lib/*, /usr/local/hadoop/share/hadoop/mapreduce/*, /usr/local/hadoop/share/hadoop/mapreduce/lib/*, /usr/local/hadoop/share/hadoop/yarn/*, /usr/local/hadoop/share/hadoop/yarn/lib/*</value>
+    </property>
+
+    <property>
+    <description>
+      Number of seconds after an application finishes before the nodemanager's
+      DeletionService will delete the application's localized file directory
+      and log directory.
+
+      To diagnose Yarn application problems, set this property's value large
+      enough (for example, to 600 = 10 minutes) to permit examination of these
+      directories. After changing the property's value, you must restart the
+      nodemanager in order for it to have an effect.
+
+      The roots of Yarn applications' work directories is configurable with
+      the yarn.nodemanager.local-dirs property (see below), and the roots
+      of the Yarn applications' log directories is configurable with the
+      yarn.nodemanager.log-dirs property (see also below).
+    </description>
+    <name>yarn.nodemanager.delete.debug-delay-sec</name>
+    <value>600</value>
+  </property>
+
+    <property>
+      <name>yarn.log-aggregation-enable</name>
+      <value>true</value> 
+    </property>
+
+    <property>
+      <name>yarn.log-aggregation.retain-seconds</name>
+      <value>900000</value> 
+    </property> 
+
+    <property>
+      <name>yarn.nodemanager.vmem-check-enabled</name>
+      <value>false</value>
+    </property>
+
+</configuration>
diff --git a/examples/quickstart/tutorial/examples/ingestion-tutorial-select-sql.json b/examples/quickstart/tutorial/examples/ingestion-tutorial-select-sql.json
new file mode 100644
index 00000000000..08896fe09b6
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/ingestion-tutorial-select-sql.json
@@ -0,0 +1,3 @@
+{
+  "query":"select * from \"ingestion-tutorial\""
+}
diff --git a/examples/quickstart/tutorial/examples/retention-index.json b/examples/quickstart/tutorial/examples/retention-index.json
new file mode 100644
index 00000000000..5ae9d327661
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/retention-index.json
@@ -0,0 +1,64 @@
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "retention-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "channel",
+              "cityName",
+              "comment",
+              "countryIsoCode",
+              "countryName",
+              "isAnonymous",
+              "isMinor",
+              "isNew",
+              "isRobot",
+              "isUnpatrolled",
+              "metroCode",
+              "namespace",
+              "page",
+              "regionIsoCode",
+              "regionName",
+              "user",
+              { "name": "added", "type": "long" },
+              { "name": "deleted", "type": "long" },
+              { "name": "delta", "type": "long" }
+            ]
+          },
+          "timestampSpec": {
+            "column": "time",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "hour",
+        "queryGranularity" : "none",
+        "intervals" : ["2015-09-12/2015-09-13"],
+        "rollup" : false
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "quickstart/",
+        "filter" : "wikiticker-2015-09-12-sampled.json.gz"
+      },
+      "appendToExisting" : false
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/rollup-data.json b/examples/quickstart/tutorial/examples/rollup-data.json
new file mode 100644
index 00000000000..63c8dd7b659
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/rollup-data.json
@@ -0,0 +1,9 @@
+{"timestamp":"2018-01-01T01:01:35Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":20,"bytes":9024}
+{"timestamp":"2018-01-01T01:01:51Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":255,"bytes":21133}
+{"timestamp":"2018-01-01T01:01:59Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":11,"bytes":5780}
+{"timestamp":"2018-01-01T01:02:14Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":38,"bytes":6289}
+{"timestamp":"2018-01-01T01:02:29Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":377,"bytes":359971}
+{"timestamp":"2018-01-01T01:03:29Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":49,"bytes":10204}
+{"timestamp":"2018-01-02T21:33:14Z","srcIP":"7.7.7.7", "dstIP":"8.8.8.8","packets":38,"bytes":6289}
+{"timestamp":"2018-01-02T21:33:45Z","srcIP":"7.7.7.7", "dstIP":"8.8.8.8","packets":123,"bytes":93999}
+{"timestamp":"2018-01-02T21:35:45Z","srcIP":"7.7.7.7", "dstIP":"8.8.8.8","packets":12,"bytes":2818}
diff --git a/examples/quickstart/tutorial/examples/rollup-index.json b/examples/quickstart/tutorial/examples/rollup-index.json
new file mode 100644
index 00000000000..d205e408a8f
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/rollup-index.json
@@ -0,0 +1,51 @@
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "rollup-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "srcIP",
+              "dstIP"
+            ]
+          },
+          "timestampSpec": {
+            "column": "timestamp",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [
+        { "type" : "count", "name" : "count" },
+        { "type" : "longSum", "name" : "packets", "fieldName" : "packets" },
+        { "type" : "longSum", "name" : "bytes", "fieldName" : "bytes" }
+      ],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "week",
+        "queryGranularity" : "minute",
+        "intervals" : ["2018-01-01/2018-01-03"],
+        "rollup" : true
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "examples/",
+        "filter" : "rollup-data.json"
+      },
+      "appendToExisting" : false
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/rollup-select-sql.json b/examples/quickstart/tutorial/examples/rollup-select-sql.json
new file mode 100644
index 00000000000..a6fe9f93586
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/rollup-select-sql.json
@@ -0,0 +1,3 @@
+{
+"query":"select * from \"rollup-tutorial\""
+}
diff --git a/examples/quickstart/tutorial/examples/transform-data.json b/examples/quickstart/tutorial/examples/transform-data.json
new file mode 100644
index 00000000000..562c6f4d519
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/transform-data.json
@@ -0,0 +1,4 @@
+{"timestamp":"2018-01-01T07:01:35Z","animal":"octopus",  "location":1, "number":100}
+{"timestamp":"2018-01-01T05:01:35Z","animal":"mongoose", "location":2,"number":200}
+{"timestamp":"2018-01-01T06:01:35Z","animal":"snake", "location":3, "number":300}
+{"timestamp":"2018-01-01T01:01:35Z","animal":"lion", "location":4, "number":300}
diff --git a/examples/quickstart/tutorial/examples/transform-index.json b/examples/quickstart/tutorial/examples/transform-index.json
new file mode 100644
index 00000000000..baaeccd78a7
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/transform-index.json
@@ -0,0 +1,73 @@
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "transform-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "animal",
+              { "name": "location", "type": "long" }
+            ]
+          },
+          "timestampSpec": {
+            "column": "timestamp",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [
+        { "type" : "count", "name" : "count" },
+        { "type" : "longSum", "name" : "number", "fieldName" : "number" },
+        { "type" : "longSum", "name" : "triple-number", "fieldName" : "triple-number" }
+      ],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "week",
+        "queryGranularity" : "minute",
+        "intervals" : ["2018-01-01/2018-01-03"],
+        "rollup" : true
+      },
+      "transformSpec": {
+        "transforms": [
+          {
+            "type": "expression",
+            "name": "animal",
+            "expression": "concat('super-', animal)"
+          },
+          {
+            "type": "expression",
+            "name": "triple-number",
+            "expression": "number * 3"
+          }
+        ],
+        "filter": {
+          "type":"or",
+          "fields": [
+            { "type": "selector", "dimension": "animal", "value": "super-mongoose" },
+            { "type": "selector", "dimension": "triple-number", "value": "300" },
+            { "type": "selector", "dimension": "location", "value": "3" }
+          ]
+        }
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "examples/",
+        "filter" : "transform-data.json"
+      },
+      "appendToExisting" : false
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/transform-select-sql.json b/examples/quickstart/tutorial/examples/transform-select-sql.json
new file mode 100644
index 00000000000..acc3f0aea8b
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/transform-select-sql.json
@@ -0,0 +1,3 @@
+{
+  "query":"select * from \"transform-tutorial\""
+}
diff --git a/examples/quickstart/tutorial/examples/updates-append-index.json b/examples/quickstart/tutorial/examples/updates-append-index.json
new file mode 100644
index 00000000000..164de1b2a0b
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/updates-append-index.json
@@ -0,0 +1,49 @@
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "updates-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "animal"
+            ]
+          },
+          "timestampSpec": {
+            "column": "timestamp",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [
+        { "type" : "count", "name" : "count" },
+        { "type" : "longSum", "name" : "number", "fieldName" : "number" }
+      ],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "week",
+        "queryGranularity" : "minute",
+        "intervals" : ["2018-01-01/2018-01-03"],
+        "rollup" : true
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "examples/",
+        "filter" : "updates-data3.json"
+      },
+      "appendToExisting" : true
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/updates-append-index2.json b/examples/quickstart/tutorial/examples/updates-append-index2.json
new file mode 100644
index 00000000000..2c9a40cd463
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/updates-append-index2.json
@@ -0,0 +1,49 @@
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "updates-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "animal"
+            ]
+          },
+          "timestampSpec": {
+            "column": "timestamp",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [
+        { "type" : "count", "name" : "count" },
+        { "type" : "longSum", "name" : "number", "fieldName" : "number" }
+      ],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "week",
+        "queryGranularity" : "minute",
+        "intervals" : ["2018-01-01/2018-01-03"],
+        "rollup" : true
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "examples/",
+        "filter" : "updates-data4.json"
+      },
+      "appendToExisting" : true
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/updates-data.json b/examples/quickstart/tutorial/examples/updates-data.json
new file mode 100644
index 00000000000..da59a6b813a
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/updates-data.json
@@ -0,0 +1,3 @@
+{"timestamp":"2018-01-01T01:01:35Z","animal":"tiger", "number":100}
+{"timestamp":"2018-01-01T03:01:35Z","animal":"aardvark", "number":42}
+{"timestamp":"2018-01-01T03:01:35Z","animal":"giraffe", "number":14124}
diff --git a/examples/quickstart/tutorial/examples/updates-data2.json b/examples/quickstart/tutorial/examples/updates-data2.json
new file mode 100644
index 00000000000..640210fc651
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/updates-data2.json
@@ -0,0 +1,3 @@
+{"timestamp":"2018-01-01T01:01:35Z","animal":"lion", "number":100}
+{"timestamp":"2018-01-01T03:01:35Z","animal":"aardvark", "number":9999}
+{"timestamp":"2018-01-01T04:01:35Z","animal":"bear", "number":111}
diff --git a/examples/quickstart/tutorial/examples/updates-data3.json b/examples/quickstart/tutorial/examples/updates-data3.json
new file mode 100644
index 00000000000..68f8cdccef8
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/updates-data3.json
@@ -0,0 +1,6 @@
+{"timestamp":"2018-01-01T07:01:35Z","animal":"octopus", "number":115}
+{"timestamp":"2018-01-01T05:01:35Z","animal":"mongoose", "number":737}
+{"timestamp":"2018-01-01T06:01:35Z","animal":"snake", "number":1234}
+{"timestamp":"2018-01-01T01:01:35Z","animal":"lion", "number":300}
+{"timestamp":"2018-01-01T04:01:35Z","animal":"bear", "number":222}
+{"timestamp":"2018-01-01T09:01:35Z","animal":"falcon", "number":1241}
diff --git a/examples/quickstart/tutorial/examples/updates-data4.json b/examples/quickstart/tutorial/examples/updates-data4.json
new file mode 100644
index 00000000000..a0a95b2843c
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/updates-data4.json
@@ -0,0 +1,2 @@
+{"timestamp":"2018-01-01T04:01:35Z","animal":"bear", "number":222}
+{"timestamp":"2018-01-01T09:01:35Z","animal":"falcon", "number":1241}
diff --git a/examples/quickstart/tutorial/examples/updates-groupby-sql.json b/examples/quickstart/tutorial/examples/updates-groupby-sql.json
new file mode 100644
index 00000000000..ab90d68f8b2
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/updates-groupby-sql.json
@@ -0,0 +1,3 @@
+{
+  "query":"select __time, animal, SUM(\"count\"), SUM(\"number\") from \"updates-tutorial\" group by __time, animal"
+}
diff --git a/examples/quickstart/tutorial/examples/updates-init-index.json b/examples/quickstart/tutorial/examples/updates-init-index.json
new file mode 100644
index 00000000000..ed4cf76f8e8
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/updates-init-index.json
@@ -0,0 +1,49 @@
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "updates-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "animal"
+            ]
+          },
+          "timestampSpec": {
+            "column": "timestamp",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [
+        { "type" : "count", "name" : "count" },
+        { "type" : "longSum", "name" : "number", "fieldName" : "number" }
+      ],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "week",
+        "queryGranularity" : "minute",
+        "intervals" : ["2018-01-01/2018-01-03"],
+        "rollup" : true
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "examples/",
+        "filter" : "updates-data.json"
+      },
+      "appendToExisting" : false
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/updates-overwrite-index.json b/examples/quickstart/tutorial/examples/updates-overwrite-index.json
new file mode 100644
index 00000000000..7f96a580c45
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/updates-overwrite-index.json
@@ -0,0 +1,49 @@
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "updates-tutorial",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "animal"
+            ]
+          },
+          "timestampSpec": {
+            "column": "timestamp",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [
+        { "type" : "count", "name" : "count" },
+        { "type" : "longSum", "name" : "number", "fieldName" : "number" }
+      ],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "week",
+        "queryGranularity" : "minute",
+        "intervals" : ["2018-01-01/2018-01-03"],
+        "rollup" : true
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "examples/",
+        "filter" : "updates-data2.json"
+      },
+      "appendToExisting" : false
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/updates-select-sql.json b/examples/quickstart/tutorial/examples/updates-select-sql.json
new file mode 100644
index 00000000000..b840e12f79b
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/updates-select-sql.json
@@ -0,0 +1,3 @@
+{
+"query":"select * from \"updates-tutorial\""
+}
diff --git a/examples/quickstart/tutorial/examples/wikipedia-explain-top-pages-sql.json b/examples/quickstart/tutorial/examples/wikipedia-explain-top-pages-sql.json
new file mode 100644
index 00000000000..a64ab7775d2
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/wikipedia-explain-top-pages-sql.json
@@ -0,0 +1,3 @@
+{
+  "query":"EXPLAIN PLAN FOR SELECT page, COUNT(*) AS Edits FROM wikipedia WHERE \"__time\" BETWEEN TIMESTAMP '2015-09-12 00:00:00' AND TIMESTAMP '2015-09-13 00:00:00' GROUP BY page ORDER BY Edits DESC LIMIT 10"
+}
diff --git a/examples/quickstart/tutorial/examples/wikipedia-groupby-sql.json b/examples/quickstart/tutorial/examples/wikipedia-groupby-sql.json
new file mode 100644
index 00000000000..5d1735b9d93
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/wikipedia-groupby-sql.json
@@ -0,0 +1,3 @@
+{
+  "query":"SELECT channel, SUM(added) FROM wikipedia WHERE \"__time\" BETWEEN TIMESTAMP '2015-09-12 00:00:00' AND TIMESTAMP '2015-09-13 00:00:00' GROUP BY channel ORDER BY SUM(added) DESC LIMIT 5"
+}
diff --git a/examples/quickstart/tutorial/examples/wikipedia-index-hadoop.json b/examples/quickstart/tutorial/examples/wikipedia-index-hadoop.json
new file mode 100644
index 00000000000..1c63d741dc1
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/wikipedia-index-hadoop.json
@@ -0,0 +1,79 @@
+{
+  "type" : "index_hadoop",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "wikipedia",
+      "parser" : {
+        "type" : "hadoopyString",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "channel",
+              "cityName",
+              "comment",
+              "countryIsoCode",
+              "countryName",
+              "isAnonymous",
+              "isMinor",
+              "isNew",
+              "isRobot",
+              "isUnpatrolled",
+              "metroCode",
+              "namespace",
+              "page",
+              "regionIsoCode",
+              "regionName",
+              "user",
+              { "name": "added", "type": "long" },
+              { "name": "deleted", "type": "long" },
+              { "name": "delta", "type": "long" }
+            ]
+          },
+          "timestampSpec" : {
+            "format" : "auto",
+            "column" : "time"
+          }
+        }
+      },
+      "metricsSpec" : [],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "day",
+        "queryGranularity" : "none",
+        "intervals" : ["2015-09-12/2015-09-13"],
+        "rollup" : false
+      }
+    },
+    "ioConfig" : {
+      "type" : "hadoop",
+      "inputSpec" : {
+        "type" : "static",
+        "paths" : "/quickstart/wikiticker-2015-09-12-sampled.json.gz"
+      }
+    },
+    "tuningConfig" : {
+      "type" : "hadoop",
+      "partitionsSpec" : {
+        "type" : "hashed",
+        "targetPartitionSize" : 5000000
+      },
+      "forceExtendableShardSpecs" : true,
+      "jobProperties" : {
+        "fs.default.name" : "hdfs://druid-hadoop-demo:9000",
+        "fs.defaultFS" : "hdfs://druid-hadoop-demo:9000",
+        "dfs.datanode.address" : "druid-hadoop-demo",
+        "dfs.client.use.datanode.hostname" : "true",
+        "dfs.datanode.use.datanode.hostname" : "true",
+        "yarn.resourcemanager.hostname" : "druid-hadoop-demo",
+        "yarn.nodemanager.vmem-check-enabled" : "false",
+        "mapreduce.map.java.opts" : "-Duser.timezone=UTC -Dfile.encoding=UTF-8",
+        "mapreduce.job.user.classpath.first" : "true",
+        "mapreduce.reduce.java.opts" : "-Duser.timezone=UTC -Dfile.encoding=UTF-8",
+        "mapreduce.map.memory.mb" : 1024,
+        "mapreduce.reduce.memory.mb" : 1024
+      }
+    }
+  },
+  "hadoopDependencyCoordinates": ["org.apache.hadoop:hadoop-client:2.7.3"]
+}
diff --git a/examples/quickstart/tutorial/examples/wikipedia-index.json b/examples/quickstart/tutorial/examples/wikipedia-index.json
new file mode 100644
index 00000000000..b24bca0c9a0
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/wikipedia-index.json
@@ -0,0 +1,64 @@
+{
+  "type" : "index",
+  "spec" : {
+    "dataSchema" : {
+      "dataSource" : "wikipedia",
+      "parser" : {
+        "type" : "string",
+        "parseSpec" : {
+          "format" : "json",
+          "dimensionsSpec" : {
+            "dimensions" : [
+              "channel",
+              "cityName",
+              "comment",
+              "countryIsoCode",
+              "countryName",
+              "isAnonymous",
+              "isMinor",
+              "isNew",
+              "isRobot",
+              "isUnpatrolled",
+              "metroCode",
+              "namespace",
+              "page",
+              "regionIsoCode",
+              "regionName",
+              "user",
+              { "name": "added", "type": "long" },
+              { "name": "deleted", "type": "long" },
+              { "name": "delta", "type": "long" }
+            ]
+          },
+          "timestampSpec": {
+            "column": "time",
+            "format": "iso"
+          }
+        }
+      },
+      "metricsSpec" : [],
+      "granularitySpec" : {
+        "type" : "uniform",
+        "segmentGranularity" : "day",
+        "queryGranularity" : "none",
+        "intervals" : ["2015-09-12/2015-09-13"],
+        "rollup" : false
+      }
+    },
+    "ioConfig" : {
+      "type" : "index",
+      "firehose" : {
+        "type" : "local",
+        "baseDir" : "quickstart/",
+        "filter" : "wikiticker-2015-09-12-sampled.json.gz"
+      },
+      "appendToExisting" : false
+    },
+    "tuningConfig" : {
+      "type" : "index",
+      "targetPartitionSize" : 5000000,
+      "maxRowsInMemory" : 25000,
+      "forceExtendableShardSpecs" : true
+    }
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/wikipedia-kafka-supervisor.json b/examples/quickstart/tutorial/examples/wikipedia-kafka-supervisor.json
new file mode 100644
index 00000000000..6988e19b172
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/wikipedia-kafka-supervisor.json
@@ -0,0 +1,59 @@
+{
+  "type": "kafka",
+  "dataSchema": {
+    "dataSource": "wikipedia",
+    "parser": {
+      "type": "string",
+      "parseSpec": {
+        "format": "json",
+        "timestampSpec": {
+          "column": "time",
+          "format": "auto"
+        },
+        "dimensionsSpec": {
+          "dimensions": [
+            "channel",
+            "cityName",
+            "comment",
+            "countryIsoCode",
+            "countryName",
+            "isAnonymous",
+            "isMinor",
+            "isNew",
+            "isRobot",
+            "isUnpatrolled",
+            "metroCode",
+            "namespace",
+            "page",
+            "regionIsoCode",
+            "regionName",
+            "user",
+            { "name": "added", "type": "long" },
+            { "name": "deleted", "type": "long" },
+            { "name": "delta", "type": "long" }
+          ]
+        }
+      }
+    },
+    "metricsSpec" : [],
+    "granularitySpec": {
+      "type": "uniform",
+      "segmentGranularity": "DAY",
+      "queryGranularity": "NONE",
+      "rollup": false
+    }
+  },
+  "tuningConfig": {
+    "type": "kafka",
+    "reportParseExceptions": false
+  },
+  "ioConfig": {
+    "topic": "wikipedia",
+    "replicas": 2,
+    "taskDuration": "PT10M",
+    "completionTimeout": "PT20M",
+    "consumerProperties": {
+      "bootstrap.servers": "localhost:9092"
+    }
+  }
+}
diff --git a/examples/quickstart/tutorial/examples/wikipedia-scan-sql.json b/examples/quickstart/tutorial/examples/wikipedia-scan-sql.json
new file mode 100644
index 00000000000..c663370106c
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/wikipedia-scan-sql.json
@@ -0,0 +1,3 @@
+{
+  "query":"SELECT user, page FROM wikipedia WHERE \"__time\" BETWEEN TIMESTAMP '2015-09-12 02:00:00' AND TIMESTAMP '2015-09-12 03:00:00' LIMIT 5"
+}
diff --git a/examples/quickstart/tutorial/examples/wikipedia-timeseries-sql.json b/examples/quickstart/tutorial/examples/wikipedia-timeseries-sql.json
new file mode 100644
index 00000000000..c857be24000
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/wikipedia-timeseries-sql.json
@@ -0,0 +1,3 @@
+{
+  "query":"SELECT FLOOR(__time to HOUR) AS HourTime, SUM(deleted) AS LinesDeleted FROM wikipedia WHERE \"__time\" BETWEEN TIMESTAMP '2015-09-12 00:00:00' AND TIMESTAMP '2015-09-13 00:00:00' GROUP BY FLOOR(__time to HOUR)"
+}
diff --git a/examples/quickstart/tutorial/examples/wikipedia-top-pages-sql.json b/examples/quickstart/tutorial/examples/wikipedia-top-pages-sql.json
new file mode 100644
index 00000000000..b1b0fdcd5a8
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/wikipedia-top-pages-sql.json
@@ -0,0 +1,3 @@
+{
+  "query":"SELECT page, COUNT(*) AS Edits FROM wikipedia WHERE \"__time\" BETWEEN TIMESTAMP '2015-09-12 00:00:00' AND TIMESTAMP '2015-09-13 00:00:00' GROUP BY page ORDER BY Edits DESC LIMIT 10"
+}
diff --git a/examples/quickstart/tutorial/examples/wikipedia-top-pages.json b/examples/quickstart/tutorial/examples/wikipedia-top-pages.json
new file mode 100644
index 00000000000..2961480e539
--- /dev/null
+++ b/examples/quickstart/tutorial/examples/wikipedia-top-pages.json
@@ -0,0 +1,15 @@
+{
+  "queryType" : "topN",
+  "dataSource" : "wikipedia",
+  "intervals" : ["2015-09-12/2015-09-13"],
+  "granularity" : "all",
+  "dimension" : "page",
+  "metric" : "count",
+  "threshold" : 10,
+  "aggregations" : [
+    {
+      "type" : "count",
+      "name" : "count"
+    }
+  ]
+}
\ No newline at end of file


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org