You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by hy...@apache.org on 2014/03/05 09:11:21 UTC

[1/2] TAJO-642: Change tajo documentation tool to sphinx.

Repository: incubator-tajo
Updated Branches:
  refs/heads/master 7454fd871 -> c9fadb76b


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/sql_language/predicates.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/sql_language/predicates.rst b/tajo-docs/src/main/sphinx/sql_language/predicates.rst
new file mode 100644
index 0000000..b96376b
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/sql_language/predicates.rst
@@ -0,0 +1,159 @@
+*****************
+ Predicates
+*****************
+
+=====================
+ IN Predicate
+=====================
+
+IN predicate provides row and array comparison.
+
+*Synopsis*
+
+.. code-block:: sql
+
+  column_reference IN (val1, val2, ..., valN)
+  column_reference NOT IN (val1, val2, ..., valN)
+
+
+Examples are as follows:
+
+.. code-block:: sql
+
+  -- this statement filters lists down all the records where col1 value is 1, 2 or 3:
+  SELECT col1, col2 FROM table1 WHERE col1 IN (1, 2, 3);
+
+  -- this statement filters lists down all the records where col1 value is neither 1, 2 nor 3:
+  SELECT col1, col2 FROM table1 WHERE col1 NOT IN (1, 2, 3);
+
+You can use 'IN clause' on text data domain as follows:
+
+.. code-block:: sql
+
+  SELECT col1, col2 FROM table1 WHERE col2 IN ('tajo', 'hadoop');
+
+  SELECT col1, col2 FROM table1 WHERE col2 NOT IN ('tajo', 'hadoop');
+
+
+==================================
+String Pattern Matching Predicates
+==================================
+
+--------------------
+LIKE
+--------------------
+
+LIKE operator returns true or false depending on whether its pattern matches the given string. An underscore (_) in pattern matches any single character. A percent sign (%) matches any sequence of zero or more characters.
+
+*Synopsis*
+
+.. code-block:: sql
+
+  string LIKE pattern
+  string NOT LIKE pattern
+
+
+--------------------
+ILIKE
+--------------------
+
+ILIKE is the same to LIKE, but it is a case insensitive operator. It is not in the SQL standard. We borrow this operator from PostgreSQL.
+
+*Synopsis*
+
+.. code-block:: sql
+
+  string ILIKE pattern
+  string NOT ILIKE pattern
+
+
+--------------------
+SIMILAR TO
+--------------------
+
+*Synopsis*
+
+.. code-block:: sql
+
+  string SIMILAR TO pattern
+  string NOT SIMILAR TO pattern
+
+It returns true or false depending on whether its pattern matches the given string. Also like LIKE, ``SIMILAR TO`` uses ``_`` and ``%`` as metacharacters denoting any single character and any string, respectively.
+
+In addition to these metacharacters borrowed from LIKE, 'SIMILAR TO' supports more powerful pattern-matching metacharacters borrowed from regular expressions:
+
++------------------------+-------------------------------------------------------------------------------------------+
+| metacharacter          | description                                                                               |
++========================+===========================================================================================+
+| |                 | denotes alternation (either of two alternatives).                                         |
++------------------------+-------------------------------------------------------------------------------------------+
+| *                      | denotes repetition of the previous item zero or more times.                               |
++------------------------+-------------------------------------------------------------------------------------------+
+| +                      | denotes repetition of the previous item one or more times.                                |
++------------------------+-------------------------------------------------------------------------------------------+
+| ?                      | denotes repetition of the previous item zero or one time.                                 |
++------------------------+-------------------------------------------------------------------------------------------+
+| {m}                    | denotes repetition of the previous item exactly m times.                                  |
++------------------------+-------------------------------------------------------------------------------------------+
+| {m,}                   | denotes repetition of the previous item m or more times.                                  |
++------------------------+-------------------------------------------------------------------------------------------+
+| {m,n}                  | denotes repetition of the previous item at least m and not more than n times.             |
++------------------------+-------------------------------------------------------------------------------------------+
+| []                     | A bracket expression specifies a character class, just as in POSIX regular expressions.   |
++------------------------+-------------------------------------------------------------------------------------------+
+| ()                     | Parentheses can be used to group items into a single logical item.                        |
++------------------------+-------------------------------------------------------------------------------------------+
+
+Note that `.`` is not used as a metacharacter in ``SIMILAR TO`` operator.
+
+---------------------
+Regular expressions
+---------------------
+
+Regular expressions provide a very powerful means for string pattern matching. In the current Tajo, regular expressions are based on Java-style regular expressions instead of POSIX regular expression. The main difference between java-style one and POSIX's one is character class.
+
+*Synopsis*
+
+.. code-block:: sql
+
+  string ~ pattern
+  string !~ pattern
+
+  string ~* pattern
+  string !~* pattern
+
++----------+---------------------------------------------------------------------------------------------------+
+| operator | Description                                                                                       |
++==========+===================================================================================================+
+| ~        | It returns true if a given regular expression is matched to string. Otherwise, it returns false.  |
++----------+---------------------------------------------------------------------------------------------------+
+| !~       | It returns false if a given regular expression is matched to string. Otherwise, it returns true.  |
++----------+---------------------------------------------------------------------------------------------------+
+| ~*       | It is the same to '~', but it is case insensitive.                                                |
++----------+---------------------------------------------------------------------------------------------------+
+| !~*      | It is the same to '!~', but it is case insensitive.                                               |
++----------+---------------------------------------------------------------------------------------------------+
+
+Here are examples:
+
+.. code-block:: sql
+
+  'abc'   ~   '.*c'               true
+  'abc'   ~   'c'                 false
+  'aaabc' ~   '([a-z]){3}bc       true
+  'abc'   ~*  '.*C'               true
+  'abc'   !~* 'B.*'               true
+
+Regular expressions operator is not in the SQL standard. We borrow this operator from PostgreSQL.
+
+*Synopsis for REGEXP and RLIKE operators*
+
+.. code-block:: sql
+
+  string REGEXP pattern
+  string NOT REGEXP pattern
+
+  string RLIKE pattern
+  string NOT RLIKE pattern
+
+But, they do not support case-insensitive operators.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/sql_language/queries.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/sql_language/queries.rst b/tajo-docs/src/main/sphinx/sql_language/queries.rst
new file mode 100644
index 0000000..8a212a5
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/sql_language/queries.rst
@@ -0,0 +1,38 @@
+**************************
+Queries
+**************************
+
+=====================
+Overview
+=====================
+
+*Synopsis*
+
+.. code-block:: sql
+
+  SELECT [distinct [all]] * | <expression> [[AS] <alias>] [, ...]
+    [FROM <table name> [[AS] <table alias name>] [, ...]]
+    [WHERE <condition>]
+    [GROUP BY <expression> [, ...]]
+    [HAVING <condition>]
+    [ORDER BY <expression> [ASC|DESC] [NULL FIRST|NULL LAST] [, ...]]
+
+
+
+=====================
+From Clause
+=====================
+
+
+=====================
+Where Clause
+=====================
+
+
+=====================
+Groupby Clause
+=====================
+
+=====================
+Select list
+=====================
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/sql_language/sql_expression.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/sql_language/sql_expression.rst b/tajo-docs/src/main/sphinx/sql_language/sql_expression.rst
new file mode 100644
index 0000000..e5f4d62
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/sql_language/sql_expression.rst
@@ -0,0 +1,31 @@
+============================
+ SQL Expressions
+============================
+
+-------------------------
+ Arithmetic Expressions
+-------------------------
+
+-------------------------
+Type Casts
+-------------------------
+A type cast converts a specified-typed data to another-typed data. Tajo has two type cast syntax:
+
+.. code-block:: sql
+
+  CAST ( expression AS type )
+  expression::type
+
+
+-------------------------
+String Expressions
+-------------------------
+
+
+-------------------------
+Function Call
+-------------------------
+
+.. code-block:: sql
+
+  function_name ([expression [, expression ... ]] )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/table_management.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/table_management.rst b/tajo-docs/src/main/sphinx/table_management.rst
new file mode 100644
index 0000000..62a8e45
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/table_management.rst
@@ -0,0 +1,9 @@
+******************
+Table Management
+******************
+
+.. toctree::
+    :maxdepth: 1
+
+    table_management/file_formats
+    table_management/compression

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/table_management/compression.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/table_management/compression.rst b/tajo-docs/src/main/sphinx/table_management/compression.rst
new file mode 100644
index 0000000..3d03ba8
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/table_management/compression.rst
@@ -0,0 +1,5 @@
+*********************************
+Compression
+*********************************
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/table_management/file_formats.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/table_management/file_formats.rst b/tajo-docs/src/main/sphinx/table_management/file_formats.rst
new file mode 100644
index 0000000..26edac4
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/table_management/file_formats.rst
@@ -0,0 +1,13 @@
+*************************************
+File Formats
+*************************************
+
+.. todo::
+
+===============================
+Text File
+===============================
+
+===============================
+RCFile
+===============================
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/table_partitioning.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/table_partitioning.rst b/tajo-docs/src/main/sphinx/table_partitioning.rst
new file mode 100644
index 0000000..c7b5325
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/table_partitioning.rst
@@ -0,0 +1,11 @@
+******************
+Table Partitioning
+******************
+
+.. toctree::
+    :maxdepth: 1
+
+    partitioning/intro_to_partitioning
+    partitioning/column_partitioning
+    partitioning/range_partitioning
+    partitioning/hash_partitioning
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/tajo_client_api.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/tajo_client_api.rst b/tajo-docs/src/main/sphinx/tajo_client_api.rst
new file mode 100644
index 0000000..d9d6596
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/tajo_client_api.rst
@@ -0,0 +1,5 @@
+*************************************
+Tajo Client API
+*************************************
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-project/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/tajo-project/src/site/apt/index.apt b/tajo-project/src/site/apt/index.apt
index 6d718f2..d452a3f 100644
--- a/tajo-project/src/site/apt/index.apt
+++ b/tajo-project/src/site/apt/index.apt
@@ -14,9 +14,9 @@
 ~~ See the License for the specific language governing permissions and
 ~~ limitations under the License.
 
-Apache Tajo &#153; - An open source big data warehouse system in Hadoop
+Apache Tajo&#153; - An open source big data warehouse system in Hadoop
 
-  The main goal of Apache Tajo &#153; project is to build an advanced open source data warehouse system in Hadoop for processing web-scale data sets	
+  The main goal of Apache Tajo&#153; project is to build an advanced open source data warehouse system in Hadoop for processing web-scale data sets	
 
 Features
 
@@ -71,6 +71,8 @@ Features
 
 News
 
+  * <<[2014-02-27]>> Keuntae Park was invited to ApacheConf 2014.
+
   * <<[2014-01-02]>> Keuntae Park was invited to become a new committer.
 
   * <<[2013-11-20]>> Tajo 0.2.0-incubating Released. Now available for {{{http://apache.org/dyn/closer.cgi/incubator/tajo/tajo-0.2.0-incubating/}download}}!
@@ -93,7 +95,7 @@ Downloads
 
 Disclaimer
 
-  Apache Tajo &#153; is an effort undergoing incubation at The Apache Software Foundation (ASF)
+  Apache Tajo&#153; is an effort undergoing incubation at The Apache Software Foundation (ASF)
   sponsored by the Apache Incubator PMC. Incubation is required of all newly accepted projects
   until a further review indicates that the infrastructure, communications, and decision making
   process have stabilized in a manner consistent with other successful ASF projects.

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-project/src/site/site.xml
----------------------------------------------------------------------
diff --git a/tajo-project/src/site/site.xml b/tajo-project/src/site/site.xml
index e89dcca..39f99ae 100644
--- a/tajo-project/src/site/site.xml
+++ b/tajo-project/src/site/site.xml
@@ -95,8 +95,8 @@
     </menu>
 
     <menu name="Documentation">
-      <item name="0.8.0-SNAPSHOT (Dev)" href="tajo-0.8.0-doc.html" />
-      <item name="0.2.0-incubating (Current)" href="tajo-0.2.0-doc.html" />
+      <item name="0.8.0-SNAPSHOT (dev)" href="docs/0.8.0/index.html" />
+      <item name="0.2.0-incubating release" href="tajo-0.2.0-doc.html" />
     </menu>
 
     <menu name="Contributes">


[2/2] git commit: TAJO-642: Change tajo documentation tool to sphinx.

Posted by hy...@apache.org.
TAJO-642: Change tajo documentation tool to sphinx.


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

Branch: refs/heads/master
Commit: c9fadb76b9b761dd6229ab513b9963b247c3be40
Parents: 7454fd8
Author: Hyunsik Choi <hy...@apache.org>
Authored: Wed Mar 5 17:10:20 2014 +0900
Committer: Hyunsik Choi <hy...@apache.org>
Committed: Wed Mar 5 17:11:07 2014 +0900

----------------------------------------------------------------------
 CHANGES.txt                                     |   2 +
 pom.xml                                         |   3 +
 tajo-docs/BUILDING.txt                          |  23 ++
 tajo-docs/Makefile                              | 189 ++++++++++++
 tajo-docs/pom.xml                               |  53 ++++
 .../src/main/sphinx/backup_and_restore.rst      |   8 +
 .../main/sphinx/backup_and_restore/catalog.rst  |  48 ++++
 tajo-docs/src/main/sphinx/cli.rst               | 101 +++++++
 tajo-docs/src/main/sphinx/conf.py               | 286 +++++++++++++++++++
 tajo-docs/src/main/sphinx/configuration.rst     |  13 +
 .../configuration/catalog_configuration.rst     |  96 +++++++
 .../main/sphinx/configuration/cluster_setup.rst |  10 +
 .../configuration/configuration_defaults.rst    |  28 ++
 .../main/sphinx/configuration/preliminary.rst   |  40 +++
 .../configuration/tajo_master_configuration.rst |  32 +++
 .../configuration/worker_configuration.rst      | 105 +++++++
 tajo-docs/src/main/sphinx/faq.rst               |   5 +
 tajo-docs/src/main/sphinx/functions.rst         |  10 +
 .../functions/datetime_func_and_operators.rst   |   5 +
 .../functions/math_func_and_operators.rst       |   5 +
 .../functions/string_func_and_operators.rst     | 154 ++++++++++
 tajo-docs/src/main/sphinx/getting_started.rst   |  14 +
 .../main/sphinx/getting_started/building.rst    |  22 ++
 .../getting_started/downloading_source.rst      |  32 +++
 .../main/sphinx/getting_started/first_query.rst |  68 +++++
 .../main/sphinx/getting_started/local_setup.rst |  22 ++
 .../sphinx/getting_started/prerequisites.rst    |   7 +
 .../src/main/sphinx/hcatalog_integration.rst    |   5 +
 tajo-docs/src/main/sphinx/index.rst             |  46 +++
 tajo-docs/src/main/sphinx/introduction.rst      |  13 +
 tajo-docs/src/main/sphinx/jdbc_driver.rst       |   9 +
 .../sphinx/partitioning/column_partitioning.rst |   5 +
 .../sphinx/partitioning/hash_partitioning.rst   |   5 +
 .../partitioning/intro_to_partitioning.rst      |  16 ++
 .../sphinx/partitioning/range_partitioning.rst  |   5 +
 tajo-docs/src/main/sphinx/sql_language.rst      |  13 +
 .../src/main/sphinx/sql_language/data_model.rst |  66 +++++
 tajo-docs/src/main/sphinx/sql_language/ddl.rst  |  53 ++++
 .../src/main/sphinx/sql_language/insert.rst     |  26 ++
 .../src/main/sphinx/sql_language/predicates.rst | 159 +++++++++++
 .../src/main/sphinx/sql_language/queries.rst    |  38 +++
 .../main/sphinx/sql_language/sql_expression.rst |  31 ++
 tajo-docs/src/main/sphinx/table_management.rst  |   9 +
 .../sphinx/table_management/compression.rst     |   5 +
 .../sphinx/table_management/file_formats.rst    |  13 +
 .../src/main/sphinx/table_partitioning.rst      |  11 +
 tajo-docs/src/main/sphinx/tajo_client_api.rst   |   5 +
 tajo-project/src/site/apt/index.apt             |   8 +-
 tajo-project/src/site/site.xml                  |   4 +-
 49 files changed, 1921 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7d15833..4955163 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -504,6 +504,8 @@ Release 0.8.0 - unreleased
 
   TASKS
 
+    TAJO-642: Change tajo documentation tool to sphinx. (hyunsik)
+
     TAJO-632: add intellij idea projects files into git ignore.
     (Min Zhou via hyunsik)
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 569e9be..274bd1d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,6 +88,7 @@
     <module>tajo-jdbc</module>
     <module>tajo-dist</module>
     <module>tajo-storage</module>
+    <module>tajo-docs</module>
   </modules>
 
   <build>
@@ -362,6 +363,8 @@
             <exclude>**/.settings/**</exclude>
             <exclude>atlassian-ide-plugin.xml</exclude>
             <exclude>.reviewboardrc</exclude>
+            <!-- tajo-doc -->
+            <exclude>**/*.rst</exclude>
           </excludes>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/BUILDING.txt
----------------------------------------------------------------------
diff --git a/tajo-docs/BUILDING.txt b/tajo-docs/BUILDING.txt
new file mode 100644
index 0000000..f460bb3
--- /dev/null
+++ b/tajo-docs/BUILDING.txt
@@ -0,0 +1,23 @@
+========================
+Build Tajo Documentation
+========================
+
+First of all, get Sphinx from the Python as follows:
+
+  $ easy_install -U Sphinx
+
+Generate HTML docs via Maven:
+
+  $ mvn clean package
+  $ ls -l tajo-docs/target/html
+  index.html
+  ....
+  ....
+
+Generate HTML docs quickly while developing:
+
+  $ make html
+  $ ls -l tajo-docs/target/html
+  index.html
+  ....
+  ....

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/Makefile
----------------------------------------------------------------------
diff --git a/tajo-docs/Makefile b/tajo-docs/Makefile
new file mode 100644
index 0000000..79223f2
--- /dev/null
+++ b/tajo-docs/Makefile
@@ -0,0 +1,189 @@
+# 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.
+
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = target
+
+# User-friendly check for sphinx-build
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
+endif
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) src/main/sphinx 
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) src/main/sphinx
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  xml        to make Docutils-native XML files"
+	@echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ApacheTajo.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ApacheTajo.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/ApacheTajo"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ApacheTajo"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+latexpdfja:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through platex and dvipdfmx..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
+
+xml:
+	$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+	@echo
+	@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+pseudoxml:
+	$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+	@echo
+	@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/pom.xml
----------------------------------------------------------------------
diff --git a/tajo-docs/pom.xml b/tajo-docs/pom.xml
new file mode 100644
index 0000000..a9fa2fd
--- /dev/null
+++ b/tajo-docs/pom.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>tajo-project</artifactId>
+    <groupId>org.apache.tajo</groupId>
+    <version>0.8.0-SNAPSHOT</version>
+    <relativePath>../tajo-project</relativePath>
+  </parent>
+  <artifactId>tajo-docs</artifactId>
+  <name>Tajo Documentation</name>
+  <packaging>pom</packaging>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.tomdz.maven</groupId>
+        <artifactId>sphinx-maven-plugin</artifactId>
+        <version>1.0.2</version>
+        <configuration>
+          <fork>true</fork>
+          <force>true</force>
+          <warningsAsErrors>true</warningsAsErrors>
+          <sourceDirectory>${project.basedir}/src/main/sphinx</sourceDirectory>
+          <outputDirectory>${project.build.directory}/html</outputDirectory>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/backup_and_restore.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/backup_and_restore.rst b/tajo-docs/src/main/sphinx/backup_and_restore.rst
new file mode 100644
index 0000000..fb6a680
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/backup_and_restore.rst
@@ -0,0 +1,8 @@
+************************
+Backup and Restore
+************************
+
+.. toctree::
+    :maxdepth: 1
+
+    backup_and_restore/catalog

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/backup_and_restore/catalog.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/backup_and_restore/catalog.rst b/tajo-docs/src/main/sphinx/backup_and_restore/catalog.rst
new file mode 100644
index 0000000..b922c62
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/backup_and_restore/catalog.rst
@@ -0,0 +1,48 @@
+***************************
+Backup and Restore Catalog
+***************************
+
+Now, Tajo supports a two backup methods for 
+
+* SQL dump
+* Database-level backup 
+
+==========
+SQL dump 
+==========
+
+SQL dump is an easy and strong way. If you use this approach, you don't need to concern database-level compatiblities. If you want to backup your catalog, just use bin/tajo_dump command. The basic usage of this command is: ::
+
+  $ tajo_dump table_name > outfile
+
+For example, if you want to backup a table customer, you should type a command as follows: ::
+
+  $ bin/tajo_dump customer > table_backup.sql
+  $
+  $ cat table_backup.sql
+  -- Tajo database dump
+  -- Dump date: 10/04/2013 16:28:03
+  --
+
+  --
+  -- Name: customer; Type: TABLE; Storage: CSV
+  -- Path: file:/home/hyunsik/tpch/customer
+  --
+  CREATE EXTERNAL TABLE customer (c_custkey INT8, c_name TEXT, c_address TEXT, c_nationkey INT8, c_phone TEXT, c_acctbal FLOAT8, c_mktsegment TEXT, c_comment TEXT) USING CSV LOCATION 'file:/home/hyunsik/tpch/customer';
+  
+
+If you want to restore the catalog from the SQL dump file, please type the below command: ::
+
+  $ bin/tsql -f table_backup.sql
+
+
+If you use an option '-a', tajo_dump will dump all table DDLs. ::
+
+  $ bin/tajo_dump -a > all_backup.sql
+
+=======================
+Database-level backup
+=======================
+
+.. todo::
+

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/cli.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/cli.rst b/tajo-docs/src/main/sphinx/cli.rst
new file mode 100644
index 0000000..f2fe60c
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/cli.rst
@@ -0,0 +1,101 @@
+*****************************
+Command Line Interface (TSQL)
+*****************************
+
+==========
+Synopsis
+==========
+
+.. code-block:: bash
+
+  bin/tsql [options]
+
+
+Options
+
+* ``-c "quoted sql"`` : Execute quoted sql statements, and then the shell will exist.
+* ``-f filename (--file filename)`` : Use the file named filename as the source of commands instead of interactive shell.
+* ``-h hostname (--host hostname)`` : Specifies the host name of the machine on which the Tajo master is running.
+* ``-p port (--port port)`` : Specifies the TCP port. If it is not set, the port will be 26002 in default. 
+
+===================
+Entering tsql shell
+===================
+
+If the hostname and the port num are not given, tsql will try to connect the Tajo master specified in ${TAJO_HOME}/conf/tajo-site.xml. ::
+
+  bin/tsql
+
+  tajo>
+
+If you want to connect a specified TajoMaster, you should use '-h' and (or) 'p' options as follows: ::
+
+  bin/tsql -h localhost -p 9004
+
+  tajo> 
+
+===================
+ Meta Commands
+===================
+
+In tsql, anything command that begins with an unquoted backslash ('\') is a tsql meta-command that is processed by tsql itself.
+
+In the current implementation, there are meta commands as follows: ::
+
+  tajo> \?
+
+  General
+    \copyright  show Apache License 2.0
+    \version    show Tajo version
+    \?          show help
+    \q          quit tsql
+
+
+  Informational
+    \d         list tables
+    \d  NAME   describe table
+
+
+  Documentations
+    tsql guide        http://wiki.apache.org/tajo/tsql
+    Query language    http://wiki.apache.org/tajo/QueryLanguage
+    Functions         http://wiki.apache.org/tajo/Functions
+    Backup & restore  http://wiki.apache.org/tajo/BackupAndRestore
+    Configuration     http://wiki.apache.org/tajo/Configuration
+
+
+================
+Examples
+================
+
+If you want to list all table names, use '\d' meta command as follows: ::
+
+  tajo> \d
+  customer
+  lineitem
+  nation
+  orders
+  part
+  partsupp
+  region
+  supplier
+
+Now look at the table description: ::
+
+  tajo> \d orders
+
+  table name: orders
+  table path: hdfs:/xxx/xxx/tpch/orders
+  store type: CSV
+  number of rows: 0
+  volume (bytes): 172.0 MB
+  schema: 
+  o_orderkey      INT8
+  o_custkey       INT8
+  o_orderstatus   TEXT
+  o_totalprice    FLOAT8
+  o_orderdate     TEXT
+  o_orderpriority TEXT
+  o_clerk TEXT
+  o_shippriority  INT4
+  o_comment       TEXT
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/conf.py
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/conf.py b/tajo-docs/src/main/sphinx/conf.py
new file mode 100644
index 0000000..8aebd16
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/conf.py
@@ -0,0 +1,286 @@
+# 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.
+
+# -*- coding: utf-8 -*-
+#
+# Apache Tajo documentation build configuration file, created by
+# sphinx-quickstart on Thu Feb 27 08:29:11 2014.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+import sphinx_rtd_theme
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+    'sphinx.ext.todo',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Apache Tajo'
+copyright = u'2014, Apache Tajo Team'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.8'
+# The full version, including alpha/beta/rc tags.
+release = '0.8.0'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+#pygments_style = 'sphinx'
+pygments_style = 'tango'
+
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+#html_theme = 'haiku'
+html_theme = 'sphinx_rtd_theme'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+
+# For haiku
+#html_theme_options = {
+#  "linkcolor" : "#577492",
+#  "visitedlinkcolor" : "#577492",
+#  "hoverlinkcolor" : "#551A8B"
+#}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = 
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'ApacheTajodoc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+  ('index', 'ApacheTajo.tex', u'Apache Tajo Documentation',
+   u'Apache Tajo Team', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'apachetajo', u'Apache Tajo Documentation',
+     [u'Apache Tajo Team'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  ('index', 'ApacheTajo', u'Apache Tajo Documentation',
+   u'Apache Tajo Team', 'ApacheTajo', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
+
+# TODO
+todo_include_todos = True

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/configuration.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/configuration.rst b/tajo-docs/src/main/sphinx/configuration.rst
new file mode 100644
index 0000000..8f5c355
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/configuration.rst
@@ -0,0 +1,13 @@
+************************
+Configuration
+************************
+
+.. toctree::
+    :maxdepth: 1
+
+    configuration/preliminary
+    configuration/cluster_setup
+    configuration/tajo_master_configuration
+    configuration/worker_configuration
+    configuration/catalog_configuration
+    configuration/configuration_defaults
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/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
new file mode 100644
index 0000000..86899ba
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst
@@ -0,0 +1,96 @@
+******************************
+Catalog Configuration
+******************************
+
+If you want to customize the catalog service, copy ``$TAJO_HOME/conf/catalog-site.xml.template`` to ``catalog-site.xml``. Then, add the following configs to catalog-site.xml. Note that the default configs are enough to launch Tajo cluster in most cases.
+
+* tajo.catalog.master.addr - If you want to launch a Tajo cluster in distributed mode, you must specify this address. For more detail information, see [Default Ports](#DefaultPorts).
+* tajo.catalog.store.class - If you want to change the persistent storage of the catalog server, specify the class name. Its default value is tajo.catalog.store.DerbyStore. In the current version, Tajo provides three persistent storage classes as follows:
+
++-----------------------------------+------------------------------------------------+
+| Driver Class                      | Descriptions                                   |
++===================================+================================================+
+| tajo.catalog.store.DerbyStore     | this storage class uses Apache Derby.          |
++-----------------------------------+------------------------------------------------+
+| tajo.catalog.store.MySQLStore     | this storage class uses MySQL.                 |
++-----------------------------------+------------------------------------------------+
+| tajo.catalog.store.MemStore       | this is the in-memory storage. It is only used |
+|                                   | in unit tests to shorten the duration of unit  |
+|                                   | tests.                                         |
++-----------------------------------+------------------------------------------------+
+| tajo.catalog.store.HCatalogStore  | this storage class uses HiveMetaStore.         |
++-----------------------------------+------------------------------------------------+
+
+=========================
+MySQLStore Configuration
+=========================
+
+If you want to use MySQLStore, you must create database and user on mysql for tajo. 
+
+And then, you need to prepare mysql jdbc driver on host which can be ran TajoMaster. If you do, you should set ``TAJO_CLASSPATH`` variable in ``conf/tajo-env.sh`` with it as follows:
+
+.. code-block:: sh
+
+  export TAJO_CLASSPATH=/usr/local/mysql/lib/mysql-connector-java-x.x.x.jar
+
+Or you just can copy jdbc driver into $TAJO_HOME/lib.
+
+Finally, you should add the following config to `conf/catalog-site.xml` :
+
+.. code-block:: xml
+
+  <property>
+    <name>tajo.catalog.store.class</name>
+    <value>org.apache.tajo.catalog.store.MySQLStore</value>
+  </property>
+  <property>
+    <name>tajo.catalog.jdbc.connection.id</name>
+    <value><mysql user name></value>
+  </property>
+  <property>
+    <name>tajo.catalog.jdbc.connection.password</name>
+    <value><mysql user password></value>
+  </property>
+    <property>
+    <name>tajo.catalog.jdbc.uri</name>
+    <value>jdbc:mysql://<mysql host name>:<mysql port>/<database name for tajo>?createDatabaseIfNotExist=true</value>
+  </property>
+
+
+----------------------------------
+  HCatalogStore Configuration
+----------------------------------
+
+Tajo support HCatalogStore to integrate with hive. If you want to use HCatalogStore, you just do as follows.
+
+First, you must compile source code and get a binary archive as follows:
+
+.. code-block:: sh
+
+  $ git clone https://git-wip-us.apache.org/repos/asf/incubator-tajo.git tajo
+  $ mvn clean package -DskipTests -Pdist -Dtar -Phcatalog-0.1x.0
+  $ ls tajo-dist/target/tajo-0.8.0-SNAPSHOT.tar.gz
+
+Tajo support to build based on hive 0.11.0 and hive 0.12.0. If you use hive 0.11.0, you have to set ``-Phcatalog-0.11.0``. And if you use hive 0.12.0, you have to set ``-Phcatalog-0.12.0``.
+
+Second, you must set your hive home directory to HIVE_HOME variable in ``conf/tajo-env.sh`` with it as follows:
+
+.. code-block:: sh
+
+  export HIVE_HOME=/path/to/your/hive/directory
+
+Third, if you need to use jdbc to connect HiveMetaStore, you have to prepare mysql jdbc driver on host which can be ran TajoMaster. If you prepare it, you should set jdbc driver file path to ``HIVE_JDBC_DRIVER_DIR`` variable in conf/tajo-env.sh with it as follows:
+
+.. code-block:: sh
+
+  export HIVE_JDBC_DRIVER_DIR=/path/to/your/mysql_jdbc_driver/mysql-connector-java-x.x.x-bin.jar
+
+
+Lastly, you should add the following config to ``conf/catalog-site.xml`` :
+
+.. code-block:: xml
+
+  <property>
+    <name>tajo.catalog.store.class</name>
+    <value>org.apache.tajo.catalog.store.HCatalogStore</value>
+  </property>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/configuration/cluster_setup.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/configuration/cluster_setup.rst b/tajo-docs/src/main/sphinx/configuration/cluster_setup.rst
new file mode 100644
index 0000000..d566ecb
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/configuration/cluster_setup.rst
@@ -0,0 +1,10 @@
+*******************************************
+Tajo run modes: Standalone and Distributed
+*******************************************
+
+
+
+==========================================
+Standalone Mode
+==========================================
+

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/configuration/configuration_defaults.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/configuration/configuration_defaults.rst b/tajo-docs/src/main/sphinx/configuration/configuration_defaults.rst
new file mode 100644
index 0000000..d1e3add
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/configuration/configuration_defaults.rst
@@ -0,0 +1,28 @@
+**********************
+Configuration Defaults
+**********************
+
+====================================
+Tajo Master Configuration Defaults
+====================================
+
+============================  ==============================================================  ===========   ===============  
+  Service Name                Config Property Name                                            Description   default address 
+============================  ==============================================================  ===========   ===============  
+Tajo Master Umbilical Rpc     tajo.master.umbilical-rpc.address                                             localhost:26001 
+Tajo Master Client Rpc        tajo.master.client-rpc.address                                                localhost:26002 
+Tajo Master Info Http         tajo.master.info-http.address                                                 0.0.0.0:26080   
+Tajo Catalog Client Rpc       tajo.catalog.client-rpc.address                                               localhost:26005
+============================  ==============================================================  ===========   ===============  
+
+====================================
+Tajo Worker Configuration Defaults
+====================================
+
+============================  ==============================================================  ===========   ===============  
+  Service Name                Config Property Name                                            Description   default address 
+============================  ==============================================================  ===========   ===============  
+Tajo Worker Peer Rpc          tajo.worker.peer-rpc.address                                                  0.0.0.0:28091   
+Tajo Worker Client Rpc        tajo.worker.client-rpc.address                                                0.0.0.0:28092   
+Tajo Worker Info Http         tajo.worker.info-http.address                                                 0.0.0.0:28080   
+============================  ==============================================================  ===========   ===============  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/configuration/preliminary.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/configuration/preliminary.rst b/tajo-docs/src/main/sphinx/configuration/preliminary.rst
new file mode 100644
index 0000000..5da86ce
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/configuration/preliminary.rst
@@ -0,0 +1,40 @@
+***************
+Preliminary
+***************
+
+===================================
+catalog-site.xml and tajo-site.xml
+===================================
+Tajo's configuration is based on Hadoop's configuration system. Tajo uses two config files:
+
+* catalog-site.xml - configuration for the catalog server.
+* tajo-site.xml - configuration for other tajo modules. 
+
+Each config consists of a pair of a name and a value. If you want to set the config name ``a.b.c`` with the value ``123``, add the following element to an appropriate file.
+
+.. code-block:: xml
+
+  <property>
+    <name>a.b.c</name>
+    <value>123</value>
+  </property>
+
+Tajo has a variety of internal configs. If you don't set some config explicitly, the default config will be used for for that config. Tajo is designed to use only a few of configs in usual cases. You may not be concerned with the configuration.
+
+In default, there is no ``tajo-site.xml`` in ``${TAJO}/conf`` directory. If you set some configs, first copy ``$TAJO_HOME/conf/tajo-site.xml.templete`` to ``tajo-site.xml``. Then, add the configs to your tajo-site.
+
+============
+tajo-env.sh
+============
+
+tajo-env.sh is a shell script file. The main purpose of this file is to set shell environment variables for TajoMaster and TajoWorker java program. So, you can set some variable as follows:
+
+.. code-block:: sh
+
+  VARIABLE=value
+
+If a value is a literal string, type this as follows:
+
+.. code-block:: sh
+
+  VARIABLE='value'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/configuration/tajo_master_configuration.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/configuration/tajo_master_configuration.rst b/tajo-docs/src/main/sphinx/configuration/tajo_master_configuration.rst
new file mode 100644
index 0000000..92a1aea
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/configuration/tajo_master_configuration.rst
@@ -0,0 +1,32 @@
+**************************
+Tajo Master Configuration
+**************************
+
+================================================
+  Tajo Rootdir
+================================================
+
+Tajo uses HDFS as a primary storage layer. So, one Tajo cluster instance should have one tajo rootdir. A user is allowed to specific your tajo rootdir as follows:
+
+.. code-block:: xml
+
+  <property>
+    <name>tajo.rootdir</name>
+    <value>hdfs://namenode_hostname:port/path</value>
+  </property>
+
+Tajo rootdir must be a url form like ``scheme://hostname:port/path``. The current implementaion only supports ``hdfs://`` and ``file://`` schemes. The default value is ``file:///tmp/tajo-${user.name}/``.
+
+================================================
+TajoMaster Heap Memory Size
+================================================
+
+The environment variable TAJO_MASTER_HEAPSIZE in conf/tajo-env.sh allow Tajo Master to use the specified heap memory size.
+
+If you want to adjust heap memory size, set ``TAJO_MASTER_HEAPSIZE`` variable in ``conf/tajo-env.sh`` with a proper size as follows:
+
+.. code-block:: sh
+
+  TAJO_MASTER_HEAPSIZE=2000
+
+The default size is 1000 (1GB). 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/configuration/worker_configuration.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/configuration/worker_configuration.rst b/tajo-docs/src/main/sphinx/configuration/worker_configuration.rst
new file mode 100644
index 0000000..41f6e7f
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/configuration/worker_configuration.rst
@@ -0,0 +1,105 @@
+*********************
+Worker Configuration
+*********************
+
+========================
+Worker Heap Memory Size
+========================
+
+The environment variable ``TAJO_WORKER_HEAPSIZE`` in ``conf/tajo-env.sh`` allow Tajo Worker to use the specified heap memory size.
+
+If you want to adjust heap memory size, set ``TAJO_WORKER_HEAPSIZE`` variable in ``conf/tajo-env.sh`` with a proper size as follows:
+
+.. code-block:: bash
+
+  TAJO_WORKER_HEAPSIZE=8000
+
+The default size is 1000 (1GB).
+
+========================
+Temporary Data Directory
+========================
+
+TajoWorker stores temporary data on local file system due to out-of-core algorithms. It is possible to specify one or more temporary data directories where temporary data will be stored.
+
+``tajo-site.xml``
+
+.. code-block:: xml
+
+  <property>
+    <name>tajo.worker.tmpdir.locations</name>
+    <value>/disk1/tmpdir,/disk2/tmpdir,/disk3/tmpdir</value>
+  </property>
+  
+
+==========================================================
+Maximum number of parallel running tasks for each worker
+==========================================================
+
+In Tajo, the capacity of running tasks in parallel are determined by available resources and workload of running queries. In order to specify it, please see [Worker Resources] (#ResourceConfiguration) section.
+
+==========================================================
+Worker Resources
+==========================================================
+
+Each worker can execute multiple tasks simultaneously.
+In Tajo, users can specify the total size of memory and the number of disks for each worker. Available resources affect how many tasks are executed simultaneously.
+
+In order to specify the resource capacity of each worker, you should add the following configs to ``tajo-site.xml`` :
+
+=================================  ==========================  ===================   =========================
+  property name                     description                value type            default value            
+=================================  ==========================  ===================   =========================
+  tajo.worker.resource.cpu-cores    the number of cpu cores    integer               1                        
+  tajo.worker.resource.memory-mb    memory size (MB)           integer               1024                     
+  tajo.worker.resource.disks        the number of disks        integer               1                        
+=================================  ==========================  ===================   =========================
+
+.. note:: 
+  
+  Currently, QueryMaster requests 512MB memory and 1.0 disk per task for the backward compatibility.
+
+------------
+ Example
+------------
+
+Assume that you want to give 5120 MB memory, 6.0 disks, and 24 cores on each worker. The example configuration is as follows:
+
+``tajo-site.xml``
+
+.. code-block:: xml
+
+  <property>
+    <name>tajo.worker.resource.tajo.worker.resource.cpu-cores</name>
+    <value>24</value>
+  </property>
+  
+   <property>
+    <name>tajo.worker.resource.memory-mb</name>
+    <value>5120</value>
+  </property>
+  
+  <property>
+    <name>tajo.worker.resource.tajo.worker.resource.disks</name>
+    <value>6.0</value>
+  </property>  
+
+--------------------
+ Dedicated Mode
+--------------------
+Tajo provides a dedicated mode that allows each worker in a Tajo cluster to use whole available system resources including cpu-cores, memory, and disks. For this mode, a user should add the following config to ``tajo-site.xml`` : 
+
+.. code-block:: xml
+
+  <property>
+    <name>tajo.worker.resource.dedicated</name>
+    <value>true</value>
+  </property>
+
+In addition, it can limit the memory capacity used for Tajo worker as follows:
+
+===============================================  ================================================   ===================   =======================
+  property name                                  description                                        value type            default value           
+===============================================  ================================================   ===================   =======================
+  tajo.worker.resource.dedicated-memory-ratio    how much memory to be used in whole memory         float                 0.8                     
+===============================================  ================================================   ===================   =======================
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/faq.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/faq.rst b/tajo-docs/src/main/sphinx/faq.rst
new file mode 100644
index 0000000..af8552f
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/faq.rst
@@ -0,0 +1,5 @@
+*************************************
+FAQ
+*************************************
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/functions.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/functions.rst b/tajo-docs/src/main/sphinx/functions.rst
new file mode 100644
index 0000000..e021f00
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/functions.rst
@@ -0,0 +1,10 @@
+******************
+Functions
+******************
+
+.. toctree::
+    :maxdepth: 1
+
+    functions/math_func_and_operators
+    functions/string_func_and_operators
+    functions/datetime_func_and_operators
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/functions/datetime_func_and_operators.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/functions/datetime_func_and_operators.rst b/tajo-docs/src/main/sphinx/functions/datetime_func_and_operators.rst
new file mode 100644
index 0000000..51156fa
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/functions/datetime_func_and_operators.rst
@@ -0,0 +1,5 @@
+********************************
+DateTime Functions and Operators
+********************************
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/functions/math_func_and_operators.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/functions/math_func_and_operators.rst b/tajo-docs/src/main/sphinx/functions/math_func_and_operators.rst
new file mode 100644
index 0000000..c1329b3
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/functions/math_func_and_operators.rst
@@ -0,0 +1,5 @@
+*****************************
+Math Functions and Operators
+*****************************
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/functions/string_func_and_operators.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/functions/string_func_and_operators.rst b/tajo-docs/src/main/sphinx/functions/string_func_and_operators.rst
new file mode 100644
index 0000000..0ca27f1
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/functions/string_func_and_operators.rst
@@ -0,0 +1,154 @@
+*******************************
+String Functions and Operators
+*******************************
+
+.. function:: str1 || str2
+
+  Returns the concatnenated string of both side strings ``str1`` and ``str2``.
+
+  :param str1: first string
+  :param str2: second string
+  :rtype: text
+  :example:
+
+  .. code-block:: sql
+
+    select ‘Ta’ || ‘jo’; 
+    > 'Tajo'
+  
+
+.. function:: char_length (string text)
+
+  Returns Number of characters in string
+
+  :param string: to be counted
+  :rtype: int4
+  :alias: character_length
+  :example:
+
+  .. code-block:: sql
+
+    select char_length(‘Tajo’);
+    > 4
+
+
+.. function:: trim([leading | trailing | both] [characters] from string)
+
+  Removes the characters (a space by default) from the start/end/both ends of the string
+
+  :param string: 
+  :param characters: 
+  :rtype: text
+  :example:
+
+  .. code-block:: sql
+
+    select trim(both ‘x’ from ‘xTajoxx’);
+    > Tajo   
+
+
+.. function:: btrim(string text, [characters text])
+
+  Removes the characters (a space by default) from the both ends of the string
+  
+  :param string: 
+  :param characters: 
+  :rtype: text
+  :alias: trim
+  :example:
+
+  .. code-block:: sql
+
+    select btrim(‘xTajoxx’, ‘x’);
+    > Tajo 
+
+
+.. function:: ltrim(string text, [characters text])
+
+  Removes the characters (a space by default) from the start ends of the string
+
+  :param string: 
+  :param characters: 
+  :rtype: text
+  :example:
+
+  .. code-block:: sql
+
+    select ltrim(‘xxTajo’, ‘x’);
+    > Tajo 
+
+
+.. function:: rtrim(string text, [characters text])
+
+  Removes the characters (a space by default) from the end ends of the string
+
+  :param string: 
+  :param characters: 
+  :rtype: text
+  :example:
+
+  .. code-block:: sql
+
+    select rtrim('Tajoxx', 'x');
+    > Tajo 
+
+
+.. function:: split_part(string text, delimiter text, field int)
+
+  Splits a string on delimiter and return the given field (counting from one)
+
+  :param string: 
+  :param delimiter: 
+  :param field: 
+  :rtype: text
+  :example:
+
+  .. code-block:: sql
+
+    select split_part(‘ab_bc_cd’,‘_’,2);   
+    > bc 
+
+
+
+.. function:: regexp_replace(string text, pattern text, replacement text)
+
+  Replaces substrings matched to a given regular expression pattern
+
+  :param string: 
+  :param pattern: 
+  :param replacement: 
+  :rtype: text
+  :example:
+
+  .. code-block:: sql
+
+    select regexp_replace(‘abcdef’, ‘(ˆab|ef$)’, ‘–’); 
+    > –cd–
+
+
+.. function:: upper(string text)
+
+  makes an input text to be upper case
+
+  :param string:
+  :rtype: text
+  :example:
+
+  .. code-block:: sql
+
+    select upper('tajo');
+    > TAJO
+
+
+.. function:: lower(string text)
+
+  makes an input text to be lower case
+
+  :param string:
+  :rtype: text
+  :example:
+
+  .. code-block:: sql
+
+    select lower('TAJO');
+    > tajo

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/getting_started.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/getting_started.rst b/tajo-docs/src/main/sphinx/getting_started.rst
new file mode 100644
index 0000000..0e9bba6
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/getting_started.rst
@@ -0,0 +1,14 @@
+***************
+Getting Started
+***************
+
+In this section, we explain setup of a standalone Tajo instance. It will run against the local filesystem. In later sections, we will present how to run Tajo cluster instance on Apache Hadoop's HDFS, a distributed filesystem. This section shows you how to start up a Tajo cluster, create tables in your Tajo cluster, submit SQL queries via Tajo shell, and shutting down your Tajo cluster instance. The below exercise should take no more than ten minutes.
+
+.. toctree::
+  :maxdepth: 1
+
+  getting_started/prerequisites
+  getting_started/downloading_source
+  getting_started/building
+  getting_started/local_setup
+  getting_started/first_query
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/getting_started/building.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/getting_started/building.rst b/tajo-docs/src/main/sphinx/getting_started/building.rst
new file mode 100644
index 0000000..b5a7381
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/getting_started/building.rst
@@ -0,0 +1,22 @@
+*****************
+Build Source Code
+*****************
+
+You prepare the prerequisites and the source code, you can build the source code now.
+
+The first step of the installation procedure is to configure the source tree for your system and choose the options you would like. This is done by running the configure script. For a default installation simply enter:
+
+You can compile source code and get a binary archive as follows:
+
+.. code-block:: bash
+
+  $ cd tajo-x.y.z
+  $ mvn clean package -DskipTests -Pdist -Dtar
+  $ ls tajo-dist/target/tajo-x.y.z-SNAPSHOT.tar.gz
+
+Then, after you move some proper directory, discompress the tar.gz file as follows:
+
+.. code-block:: bash
+
+  $ cd [a directory to be parent of tajo binary]
+  $ tar xzvf ${TAJO_SRC}/tajo-dist/target/tajo-x.y.z-SNAPSHOT.tar.gz
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/getting_started/downloading_source.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/getting_started/downloading_source.rst b/tajo-docs/src/main/sphinx/getting_started/downloading_source.rst
new file mode 100644
index 0000000..a5aba5b
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/getting_started/downloading_source.rst
@@ -0,0 +1,32 @@
+****************************************************
+Dowload and unpack the source code of Apache Tajo
+****************************************************
+
+You can get either the source code release of Apache Tajo or check out the development code base from Git.
+
+================================================
+Dowload the latest source release
+================================================
+
+Choose a download site from this list of `Apache Download Mirrors <http://www.apache.org/dyn/closer.cgi/incubator/tajo>`_. 
+Click on the suggested mirror link. This will take you to a mirror of Tajo Releases. 
+Download the file that ends in .tar.gz to your local filesystem; e.g. tajo-0.8.0-incubating.tar.gz. 
+
+Decompress and untar your download and then change into the unpacked directory. ::
+
+  tar xzvf tajo-0.8.0-incubating.tar.gz
+
+================================================
+Get the source code via Git
+================================================
+
+The development codebase can also be downloaded from `the Apache git repository <https://git-wip-us.apache.org/repos/asf/incubator-tajo.git>`_ as follows: ::
+
+  git clone https://git-wip-us.apache.org/repos/asf/incubator-tajo.git
+
+A read-only git repository is also mirrored on `Github <https://github.com/apache/incubator-tajo>`_.
+
+Once you have downloaded Tajo, follow the `getting started instructions <http://tajo.incubator.apache.org/tajo-0.8.0-doc.html#GettingStarted>`_, and take a look at the rest of the Tajo documentation.
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/getting_started/first_query.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/getting_started/first_query.rst b/tajo-docs/src/main/sphinx/getting_started/first_query.rst
new file mode 100644
index 0000000..fd43619
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/getting_started/first_query.rst
@@ -0,0 +1,68 @@
+************************
+First query execution
+************************
+
+First of all, we need to prepare some data for query execution. For example, you can make a simple text-based table as follows: ::
+
+  $ mkdir /home/x/table1
+  $ cd /home/x/table1
+  $ cat > data.csv
+  1|abc|1.1|a
+  2|def|2.3|b
+  3|ghi|3.4|c
+  4|jkl|4.5|d
+  5|mno|5.6|e
+  <CTRL + D>
+
+This schema of this table is (int, text, float, text). ::
+
+  $ $TAJO_HOME/bin/tsql
+  tajo> create external table table1 (
+        id int,
+        name text, 
+        score float, 
+        type text) 
+        using csv with ('csvfile.delimiter'='|') location 'file:/home/x/table1';
+
+In order to load an external table, you need to use ‘create external table’ statement. 
+In the location clause, you should use the absolute directory path with an appropriate scheme. 
+If the table resides in HDFS, you should use ‘hdfs’ instead of ‘file’.
+
+If you want to know DDL statements in more detail, please see Query Language. ::
+
+  tajo> \d
+  table1
+
+‘d’ command shows the list of tables. ::
+
+  tajo> \d table1
+
+  table name: table1
+  table path: file:/home/x/table1
+  store type: CSV
+  number of rows: 0
+  volume (bytes): 78 B
+  schema:
+  id      INT
+  name    TEXT
+  score   FLOAT
+  type    TEXT
+
+‘d [table name]’ command shows the description of a given table.
+
+Also, you can execute SQL queries as follows: ::
+
+  tajo> select * from table1 where id > 2;
+  final state: QUERY_SUCCEEDED, init time: 0.069 sec, response time: 0.397 sec
+  result: file:/tmp/tajo-hadoop/staging/q_1363768615503_0001_000001/RESULT, 3 rows ( 35B)
+
+  id,  name,  score,  type
+  - - - - - - - - - -  - - -
+  3,  ghi,  3.4,  c
+  4,  jkl,  4.5,  d
+  5,  mno,  5.6,  e
+
+  tajo>
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/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
new file mode 100644
index 0000000..328c612
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/getting_started/local_setup.rst
@@ -0,0 +1,22 @@
+**********************************
+Setting up a local Tajo cluster
+**********************************
+
+First of all, you need to add the environment variables to conf/tajo-env.sh. ::
+
+  # Hadoop home. Required
+  export HADOOP_HOME= ...
+
+  # The java implementation to use.  Required.
+  export JAVA_HOME= ...
+
+To launch the tajo master, execute start-tajo.sh. ::
+
+  $ $TAJO_HOME/bin/start-tajo.sh
+
+After then, you can use tsql, which is the command line shell of Tajo. ::
+
+  $ $TAJO_HOME/bin/tsql
+  tajo>
+
+If you want to how to use tsql, read Tajo Interactive Shell document.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/getting_started/prerequisites.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/getting_started/prerequisites.rst b/tajo-docs/src/main/sphinx/getting_started/prerequisites.rst
new file mode 100644
index 0000000..abfd04e
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/getting_started/prerequisites.rst
@@ -0,0 +1,7 @@
+**********************
+Prerequisites
+**********************
+
+ * Hadoop 2.2.0 and higher
+ * Java 1.6 or higher
+ * Protocol buffer 2.5.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/hcatalog_integration.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/hcatalog_integration.rst b/tajo-docs/src/main/sphinx/hcatalog_integration.rst
new file mode 100644
index 0000000..552ff82
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/hcatalog_integration.rst
@@ -0,0 +1,5 @@
+*************************************
+HCatalog Integration
+*************************************
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/index.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/index.rst b/tajo-docs/src/main/sphinx/index.rst
new file mode 100644
index 0000000..689561f
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/index.rst
@@ -0,0 +1,46 @@
+.. 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 Tajo documentation master file, created by
+   sphinx-quickstart on Thu Feb 27 08:29:11 2014.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Apache Tajo™ 0.8.0 (dev) - User documentation
+===========================================================================
+
+Table of Contents:
+
+.. toctree::
+   :maxdepth: 3
+
+   introduction
+   getting_started
+   configuration
+   cli
+   sql_language
+   functions
+   table_management
+   table_partitioning
+   backup_and_restore
+   hcatalog_integration
+   jdbc_driver   
+   tajo_client_api
+   faq
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/introduction.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/introduction.rst b/tajo-docs/src/main/sphinx/introduction.rst
new file mode 100644
index 0000000..9a0ff17
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/introduction.rst
@@ -0,0 +1,13 @@
+***************
+Introduction
+***************
+
+The main goal of Apache Tajo project is to build an advanced open source
+data warehouse system in Hadoop for processing web-scale data sets. 
+Basically, Tajo provides SQL standard as a query language.
+Tajo is designed for both interactive and batch queries on data sets
+stored on HDFS and other data sources. Without hurting query response
+times, Tajo provides fault-tolerance and dynamic load balancing which
+are necessary for long-running queries. Tajo employs a cost-based and
+progressive query optimization techniques for reoptimizing running
+queries in order to avoid the worst query plans.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/jdbc_driver.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/jdbc_driver.rst b/tajo-docs/src/main/sphinx/jdbc_driver.rst
new file mode 100644
index 0000000..153fbff
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/jdbc_driver.rst
@@ -0,0 +1,9 @@
+*************************************
+Tajo JDBC Driver
+*************************************
+
+How to get JDBC driver
+=======================
+
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/partitioning/column_partitioning.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/partitioning/column_partitioning.rst b/tajo-docs/src/main/sphinx/partitioning/column_partitioning.rst
new file mode 100644
index 0000000..e88d23f
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/partitioning/column_partitioning.rst
@@ -0,0 +1,5 @@
+*********************************
+Column Partitioning
+*********************************
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/partitioning/hash_partitioning.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/partitioning/hash_partitioning.rst b/tajo-docs/src/main/sphinx/partitioning/hash_partitioning.rst
new file mode 100644
index 0000000..2134355
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/partitioning/hash_partitioning.rst
@@ -0,0 +1,5 @@
+********************************
+Hash Partitioning
+********************************
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/partitioning/intro_to_partitioning.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/partitioning/intro_to_partitioning.rst b/tajo-docs/src/main/sphinx/partitioning/intro_to_partitioning.rst
new file mode 100644
index 0000000..bfb555f
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/partitioning/intro_to_partitioning.rst
@@ -0,0 +1,16 @@
+**************************************
+Introduction to Partitioning
+**************************************
+
+======================
+Partition Key
+======================
+
+=========================
+Partitioning Methods
+=========================
+
+Tajo provides the following partitioning methods:
+ * Column Partitioning
+ * Range Partitioning (TODO)
+ * Hash Partitioning (TODO)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/partitioning/range_partitioning.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/partitioning/range_partitioning.rst b/tajo-docs/src/main/sphinx/partitioning/range_partitioning.rst
new file mode 100644
index 0000000..9878385
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/partitioning/range_partitioning.rst
@@ -0,0 +1,5 @@
+***************************
+Range Partitioning
+***************************
+
+.. todo::
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/sql_language.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/sql_language.rst b/tajo-docs/src/main/sphinx/sql_language.rst
new file mode 100644
index 0000000..1b405e6
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/sql_language.rst
@@ -0,0 +1,13 @@
+************
+SQL Language
+************
+
+.. toctree::
+    :maxdepth: 1
+
+    sql_language/data_model
+    sql_language/ddl
+    sql_language/insert
+    sql_language/queries    
+    sql_language/sql_expression
+    sql_language/predicates
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/sql_language/data_model.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/sql_language/data_model.rst b/tajo-docs/src/main/sphinx/sql_language/data_model.rst
new file mode 100644
index 0000000..e01c6d4
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/sql_language/data_model.rst
@@ -0,0 +1,66 @@
+**********
+Data Model
+**********
+
+===============
+Data Types
+===============
+
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+| Supported | SQL Type Name  |  Alias                     | Size (byte) | Description                                       | Range                                                                    |
++===========+================+============================+=============+===================================================+==========================================================================+ 
+| O         | boolean        |  bool                      |  1          |                                                   | true/false                                                               |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+  
+|           | bit            |                            |  1          |                                                   | 1/0                                                                      | 
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+|           | varbit         |  bit varying               |             |                                                   |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+| O         | smallint       |  tinyint, int2             |  2          | small-range integer value                         | -2^15 (-32,768) to 2^15 (32,767)                                         |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+| O         | integer        |  int, int4                 |  4          | integer value                                     | -2^31 (-2,147,483,648) to 2^31 - 1 (2,147,483,647)                       |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+| O         | bigint         |  bit varying               |  8          | larger range integer value                        | -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807) |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+| O         | real           |  int8                      |  4          | variable-precision, inexact, real number value    | -3.4028235E+38 to 3.4028235E+38 (6 decimal digits precision)             |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+| O         | float[(n)]     |  float4                    |  4 or 8     | variable-precision, inexact, real number value    |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+| O         | double         |  float8, double precision  |  8          | variable-precision, inexact, real number value    | 1 .7E–308 to 1.7E+308 (15 decimal digits precision)                      |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+|           | number         |  decimal                   |             |                                                   |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+|           | char[(n)]      |  character                 |             |                                                   |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+|           | varchar[(n)]   |  character varying         |             |                                                   |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+| O         | text           |  text                      |             | variable-length unicode text                      |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+|           | binary         |  binary                    |             |                                                   |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+|           | varbinary[(n)] |  binary varying            |             |                                                   |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+| O         | blob           |  bytea                     |             | variable-length binary string                     |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+|           | date           |                            |             |                                                   |                                                                          | 
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+|           | time           |                            |             |                                                   |                                                                          | 
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+|           | timetz         |  time with time zone       |             |                                                   |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+|           | timestamp      |                            |             |                                                   |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+|           | timestamptz    |                            |             |                                                   |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+ 
+| O         | inet4          |                            | 4           | IPv4 address                                      |                                                                          |
++-----------+----------------+----------------------------+-------------+---------------------------------------------------+--------------------------------------------------------------------------+
+
+-----------------------------------------
+Using real number value (real and double)
+-----------------------------------------
+
+The real and double data types are mapped to float and double of java primitives respectively. Java primitives float and double follows the IEEE 754 specification. So, these types are correctly matched to SQL standard data types.
+
++ float[( n )] is mapped to either float or double according to a given length n. If n is specified, it must be bewtween 1 and 53. The default value of n is 53.
++ If 1 <- n <- 24, a value is mapped to float (6 decimal digits precision).
++ If 25 <- n <- 53, a value is mapped to double (15 decimal digits precision). 
++ Do not use approximate real number columns in WHERE clause in order to compare some exact matches, especially the - and <> operators. The > or < comparisons work well. 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/sql_language/ddl.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/sql_language/ddl.rst b/tajo-docs/src/main/sphinx/sql_language/ddl.rst
new file mode 100644
index 0000000..2f0e9d4
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/sql_language/ddl.rst
@@ -0,0 +1,53 @@
+************************
+Data Definition Language
+************************
+
+
+========================
+CREATE TABLE
+========================
+
+*Synopsis*
+
+.. code-block:: sql
+
+  CREATE TABLE <table_name> [(<column_name> <data_type>, ... )]
+  [using <storage_type> [with (<key> = <value>, ...)]] [AS <select_statement>]
+
+  CREATE EXTERNAL TABLE
+
+  CREATE EXTERNAL TABLE <table_name> (<column_name> <data_type>, ... )
+  using <storage_type> [with (<key> = <value>, ...)] LOCATION '<path>'
+
+
+
+------------------------
+ Compression
+------------------------
+
+If you want to add an external table that contains compressed data, you should give 'compression.code' parameter to CREATE TABLE statement.
+
+.. code-block:: sql
+
+  create EXTERNAL table lineitem (
+  L_ORDERKEY bigint, 
+  L_PARTKEY bigint, 
+  ...
+  L_COMMENT text) 
+
+  USING csv WITH ('csvfile.delimiter'='|','compression.codec'='org.apache.hadoop.io.compress.DeflateCodec')
+  LOCATION 'hdfs://localhost:9010/tajo/warehouse/lineitem_100_snappy';
+
+`compression.codec` parameter can have one of the following compression codecs:
+  * org.apache.hadoop.io.compress.BZip2Codec
+  * org.apache.hadoop.io.compress.DeflateCodec
+  * org.apache.hadoop.io.compress.GzipCodec
+  * org.apache.hadoop.io.compress.SnappyCodec 
+
+========================
+ DROP TABLE
+========================
+
+.. code-block:: sql
+
+  DROP TABLE <table_name>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/c9fadb76/tajo-docs/src/main/sphinx/sql_language/insert.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/sql_language/insert.rst b/tajo-docs/src/main/sphinx/sql_language/insert.rst
new file mode 100644
index 0000000..8558a71
--- /dev/null
+++ b/tajo-docs/src/main/sphinx/sql_language/insert.rst
@@ -0,0 +1,26 @@
+*************************
+INSERT (OVERWRITE) INTO
+*************************
+
+INSERT OVERWRITE statement overwrites a table data of an existing table or a data in a given directory. Tajo's INSERT OVERWRITE statement follows ``INSERT INTO SELECT`` statement of SQL. The examples are as follows:
+
+.. code-block:: sql
+
+  create table t1 (col1 int8, col2 int4, col3 float8);
+
+  -- when a target table schema and output schema are equivalent to each other
+  INSERT OVERWRITE INTO t1 SELECT l_orderkey, l_partkey, l_quantity FROM lineitem;
+  -- or
+  INSERT OVERWRITE INTO t1 SELECT * FROM lineitem;
+
+  -- when the output schema are smaller than the target table schema
+  INSERT OVERWRITE INTO t1 SELECT l_orderkey FROM lineitem;
+
+  -- when you want to specify certain target columns
+  INSERT OVERWRITE INTO t1 (col1, col3) SELECT l_orderkey, l_quantity FROM lineitem;
+
+In addition, INSERT OVERWRITE statement overwrites table data as well as a specific directory.
+
+.. code-block:: sql
+
+  INSERT OVERWRITE INTO LOCATION '/dir/subdir' SELECT l_orderkey, l_quantity FROM lineitem;
\ No newline at end of file