From 473bc101d75e6e8668395a5fe32e6195139aea0b Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sun, 28 Jun 2015 18:23:16 -0500 Subject: [PATCH] for example/tutorial, use derby instead of mysql --- .../tutorial-a-first-look-at-druid.md | 5 ++- .../tutorials/tutorial-the-druid-cluster.md | 31 ++++--------------- .../config/_common/common.runtime.properties | 14 +++++---- 3 files changed, 18 insertions(+), 32 deletions(-) diff --git a/docs/content/tutorials/tutorial-a-first-look-at-druid.md b/docs/content/tutorials/tutorial-a-first-look-at-druid.md index 296204c6414..7a95682d751 100644 --- a/docs/content/tutorials/tutorial-a-first-look-at-druid.md +++ b/docs/content/tutorials/tutorial-a-first-look-at-druid.md @@ -76,7 +76,10 @@ You should see a bunch of files: ## External Dependencies -Druid requires 3 external dependencies. A "deep storage" that acts as a backup data repository, a "metadata storage" such as MySQL to hold configuration and metadata information, and [Apache Zookeeper](http://zookeeper.apache.org/) for coordination among different pieces of the cluster. For this tutorial, we only need the zookeeper dependency. +Druid requires 3 external dependencies. +* A "deep storage" that acts as a backup data repository. +* A "metadata storage" such as MySQL to hold configuration and metadata information. Druid uses [Apache Derby](http://db.apache.org/derby/) by default. +* [Apache Zookeeper](http://zookeeper.apache.org/) for coordination among different pieces of the cluster. For this tutorial, we only need the zookeeper dependency. #### Set up Zookeeper diff --git a/docs/content/tutorials/tutorial-the-druid-cluster.md b/docs/content/tutorials/tutorial-the-druid-cluster.md index bf021977e65..724353adca4 100644 --- a/docs/content/tutorials/tutorial-the-druid-cluster.md +++ b/docs/content/tutorials/tutorial-the-druid-cluster.md @@ -23,25 +23,12 @@ cd druid-0.7.1 ``` ## External Dependencies +Druid requires 3 external dependencies. +* A "deep storage" that acts as a backup data repository. +* A "metadata storage" such as MySQL to hold configuration and metadata information. Druid uses [Apache Derby](http://db.apache.org/derby/) by default. +* [Apache Zookeeper](http://zookeeper.apache.org/) for coordination among different pieces of the cluster. For this tutorial, we only need the zookeeper dependency. -Druid requires 3 external dependencies. A "deep storage" that acts as a backup data repository, a "metadata storage" such as MySQL to hold configuration and metadata information, and [Apache Zookeeper](http://zookeeper.apache.org/) for coordination among different pieces of the cluster. - -For deep storage, we will use local disk in this tutorial, but for production, HDFS and S3 are popular options. For the metadata storage, we'll be using MySQL, but other options such as PostgreSQL are also supported. - -#### Set up Metadata storage - -1. If you don't already have it, download MySQL Community Server here: [http://dev.mysql.com/downloads/mysql/](http://dev.mysql.com/downloads/mysql/). -2. Install MySQL. -3. Create a druid user and database. - -```bash -mysql -u root -``` - -```sql -GRANT ALL ON druid.* TO 'druid'@'localhost' IDENTIFIED BY 'diurd'; -CREATE DATABASE druid DEFAULT CHARACTER SET utf8; -``` +For deep storage, we will use the local disk in this tutorial, but for production, HDFS and S3 are popular options. For the metadata storage, Derby is used, but for production Mysql or PostgreSQL etc should be used. #### Set up Zookeeper @@ -109,17 +96,11 @@ In the directory, there should be a `common.runtime.properties` file with the fo ``` # Extensions -druid.extensions.coordinates=["io.druid.extensions:druid-examples","io.druid.extensions:druid-kafka-eight","io.druid.extensions:mysql-metadata-storage"] +druid.extensions.coordinates=["io.druid.extensions:druid-examples","io.druid.extensions:druid-kafka-eight"] # Zookeeper druid.zk.service.host=localhost -# Metadata Storage (mysql) -druid.metadata.storage.type=mysql -druid.metadata.storage.connector.connectURI=jdbc\:mysql\://localhost\:3306/druid -druid.metadata.storage.connector.user=druid -druid.metadata.storage.connector.password=diurd - # Deep storage (local filesystem for examples - don't use this in production) druid.storage.type=local druid.storage.storage.storageDirectory=/tmp/druid/localStorage diff --git a/examples/config/_common/common.runtime.properties b/examples/config/_common/common.runtime.properties index 82f27f44aae..78cc880949d 100644 --- a/examples/config/_common/common.runtime.properties +++ b/examples/config/_common/common.runtime.properties @@ -16,16 +16,18 @@ # # Extensions (no deep storage model is listed - using local fs for deep storage - not recommended for production) -druid.extensions.coordinates=["io.druid.extensions:druid-examples","io.druid.extensions:druid-kafka-eight","io.druid.extensions:mysql-metadata-storage"] +# Also, for production to use mysql add, "io.druid.extensions:mysql-metadata-storage" +druid.extensions.coordinates=["io.druid.extensions:druid-examples","io.druid.extensions:druid-kafka-eight"] # Zookeeper druid.zk.service.host=localhost -# Metadata Storage (mysql) -druid.metadata.storage.type=mysql -druid.metadata.storage.connector.connectURI=jdbc\:mysql\://localhost\:3306/druid -druid.metadata.storage.connector.user=druid -druid.metadata.storage.connector.password=diurd +# Metadata Storage (use something like mysql in production by uncommenting properties below) +# by default druid will use derby +# druid.metadata.storage.type=mysql +# druid.metadata.storage.connector.connectURI=jdbc:mysql://localhost:3306/druid +# druid.metadata.storage.connector.user=druid +# druid.metadata.storage.connector.password=diurd # Deep storage (local filesystem for examples - don't use this in production) druid.storage.type=local