TAJO-1077: Add Derby configuration documentation.

Closes #163


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/d1022fbb
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/d1022fbb
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/d1022fbb

Branch: refs/heads/block_iteration
Commit: d1022fbb8fb182ef1f83997c255f32c5f40f37d0
Parents: 2d4b084
Author: Hyunsik Choi <[email protected]>
Authored: Wed Oct 1 21:29:35 2014 -0700
Committer: Hyunsik Choi <[email protected]>
Committed: Wed Oct 1 21:29:35 2014 -0700

----------------------------------------------------------------------
 CHANGES                                         |  2 ++
 .../configuration/catalog_configuration.rst     | 33 ++++++++++++++++++++
 .../main/sphinx/getting_started/local_setup.rst |  6 ++++
 3 files changed, 41 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/d1022fbb/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 1eea41d..c73490c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -440,6 +440,8 @@ Release 0.9.0 - unreleased
 
   TASKS
 
+    TAJO-1077: Add Derby configuration documentation. (hyunsik)
+
     TAJO-1068: Add SQL Query documentation. (hyunsik)
 
     TAJO-1078: Update contributor list. (hyunsik)

http://git-wip-us.apache.org/repos/asf/tajo/blob/d1022fbb/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst 
b/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst
index cdf7168..6d36d3f 100644
--- a/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst
+++ b/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst
@@ -24,6 +24,39 @@ If you want to customize the catalog service, copy 
``$TAJO_HOME/conf/catalog-sit
 
+-----------------------------------+------------------------------------------------+
 
 =========================
+Derby Configuration
+=========================
+
+By default, Tajo uses `Apache Derby <http://db.apache.org/derby/>`_ as a 
persistent storage in order to manage table meta data. So, without any 
configuration, you can use Derby for catalog store.
+
+Also, you can set manually configs in ``conf/catalog-site.xml`` as follows:
+
+.. code-block:: xml
+
+  <property>
+    <name>tajo.catalog.store.class</name>
+    <value>org.apache.tajo.catalog.store.DerbyStore</value>
+  </property>
+
+  <property>
+    <name>tajo.catalog.uri</name>
+    <value>jdbc:derby:<absolute directory>;create=true</value>
+  </property>
+
+Since Derby is a file-based embedded database, it stores data into a specified 
directory. So, you need to specify the directory for storing data files instead 
of specifying JDBC URI with hostname and port. For example, in case where you 
use '/var/data/tajo-catalog' as a derby store directory, you should set configs 
as follows:
+
+.. code-block:: xml
+  
+  <property>
+    <name>tajo.catalog.uri</name>
+    <value>jdbc:derby:/var/data/tajo-catalog;create=true</value>
+  </property>
+
+.. warning::
+
+  By default, *Catalog server* stores catalog data into 
``/tmp/tajo-catalog-${username}`` directory. But, some operating systems may 
remove all contents in ``/tmp`` when booting up. In order to ensure persistent 
store of your catalog data, you need to set a proper location of derby 
directory.
+
+=========================
 MySQLStore Configuration
 =========================
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/d1022fbb/tajo-docs/src/main/sphinx/getting_started/local_setup.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/getting_started/local_setup.rst 
b/tajo-docs/src/main/sphinx/getting_started/local_setup.rst
index e012f1b..42a2b34 100644
--- a/tajo-docs/src/main/sphinx/getting_started/local_setup.rst
+++ b/tajo-docs/src/main/sphinx/getting_started/local_setup.rst
@@ -23,3 +23,9 @@ To launch the tajo master, execute start-tajo.sh.
 .. note::
 
   If you want to how to setup a fully distributed mode of Tajo, please see 
:doc:`/configuration/cluster_setup`.
+
+.. warning::
+
+  By default, *Catalog server* which manages table meta data uses `Apache 
Derby <http://db.apache.org/derby/>`_ as a persistent storage, and Derby stores 
data into ``/tmp/tajo-catalog-${username}`` directory. But, some operating 
systems may remove all contents in ``/tmp`` when booting up. In order to ensure 
persistent store of your catalog data, you need to set a proper location of 
derby directory. To learn Catalog configuration, please refer to 
:doc:`/configuration/catalog_configuration`.
+
+

Reply via email to