You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by ji...@apache.org on 2015/01/08 08:59:34 UTC

[3/6] tajo git commit: TAJO-1245: Add documentation about PostgreSQL and Oracle Catalog driver. (jihoon)

TAJO-1245: Add documentation about PostgreSQL and Oracle Catalog driver. (jihoon)

Closes #333


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

Branch: refs/heads/index_support
Commit: 54b2c645c454d54b6ef9ac1fb1cea621139fdf99
Parents: 4c7d829
Author: Jihoon Son <ji...@apache.org>
Authored: Wed Jan 7 17:39:12 2015 +0900
Committer: Jihoon Son <ji...@apache.org>
Committed: Wed Jan 7 17:39:28 2015 +0900

----------------------------------------------------------------------
 CHANGES                                         |  3 +
 .../configuration/catalog_configuration.rst     | 77 +++++++++++++-------
 tajo-docs/src/main/sphinx/jdbc_driver.rst       |  2 +-
 tajo-docs/src/main/sphinx/tsql/meta_command.rst |  2 +-
 4 files changed, 54 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/54b2c645/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 86dab41..d20e9d4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -27,6 +27,9 @@ Release 0.9.1 - unreleased
 
   IMPROVEMENT
 
+    TAJO-1245: Add documentation about PostgreSQL and Oracle Catalog driver. 
+    (jihoon)
+
     TAJO-1228: TajoClient should communicate with only TajoMaster without 
     TajoWorker. (hyunsik)
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/54b2c645/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst b/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst
index acf05f9..9c3b6cf 100644
--- a/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst
+++ b/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst
@@ -56,11 +56,13 @@ Since Derby is a file-based embedded database, it stores data into a specified d
 
   By default, *Catalog server* stores catalog data into ``/tmp/tajo-catalog-${username}`` directory. But, some operating systems may remove all contents in ``/tmp`` when booting up. In order to ensure persistent store of your catalog data, you need to set a proper location of derby directory.
 
-=========================
-MySQLStore Configuration
-=========================
+==================================================
+MySQL/MariaDB/PostgreSQL/Oracle Configuration
+==================================================
 
-In order to use MySQLStore, you need to create database and user on MySQL for Tajo.
+Tajo supports several database systems, including MySQL, MariaDB, PostgreSQL, and Oracle, as its catalog store.
+In order to use these systems, you first need to create a database and a user for Tajo.
+The following example shows the creation of a user and a database with MySQL.
 
 .. code-block:: sh
   
@@ -74,48 +76,48 @@ In order to use MySQLStore, you need to create database and user on MySQL for Ta
   Query OK, 0 rows affected (0.01 sec)
 
 
-And then, you need to prepare MySQL JDBC driver on the machine which can be ran TajoMaster. If you do, you should set ``TAJO_CLASSPATH`` variable in ``conf/tajo-env.sh`` with it as follows:
+Second, you must install the proper JDBC driver on the TajoMaster node. And then, you need to set the ``TAJO_CLASSPATH`` variable in ``conf/tajo-env.sh`` as follows:
 
 .. code-block:: sh
 
-  export TAJO_CLASSPATH=/usr/local/mysql/lib/mysql-connector-java-x.x.x.jar
+  (MySQL)
+  $ export TAJO_CLASSPATH=/usr/local/mysql/lib/mysql-connector-java-x.x.x.jar
+
+  (MariaDB)
+  $ export TAJO_CLASSPATH=/usr/local/mariadb/lib/mariadb-java-client-x.x.x.jar
+
+  (PostgreSQL)
+  $ export TAJO_CLASSPATH=/usr/share/java/postgresql-jdbc4.jar
+
+  (Oracle)
+  $ export TAJO_CLASSPATH=/path/to/oracle/driver/ojdbc7.jar
 
-Or you just can copy jdbc driver into ``$TAJO_HOME/lib``.
+Alternatively, you can copy the jdbc driver into ``$TAJO_HOME/lib``.
 
-Finally, you should add the following config to `conf/catalog-site.xml` :
+Finally, you must add the following configurations 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>
+    <value><user name></value>
   </property>
   <property>
     <name>tajo.catalog.jdbc.connection.password</name>
-    <value><mysql user password></value>
+    <value><user password></value>
+  </property>
+
+  <!-- MySQL -->
+  <property>
+    <name>tajo.catalog.store.class</name>
+    <value>org.apache.tajo.catalog.store.MySQLStore</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>
 
-
-===========================
-MariaDBStore Configuration
-===========================
-
-All configurations for using MariaDBStore is compatible with MySQLStore except following:
-
-.. code-block:: sh
-
-  export TAJO_CLASSPATH=/usr/local/mariadb/lib/mariadb-java-client-x.x.x.jar
-
-.. code-block:: xml
-
+  <!-- MariaDB -->
   <property>
     <name>tajo.catalog.store.class</name>
     <value>org.apache.tajo.catalog.store.MariaDBStore</value>
@@ -125,9 +127,28 @@ All configurations for using MariaDBStore is compatible with MySQLStore except f
     <value>jdbc:mariadb://<mariadb host name>:<mariadb port>/<database name for tajo>?createDatabaseIfNotExist=true</value>
   </property>
 
+  <!-- PostgreSQL -->
+  <property>
+    <name>tajo.catalog.store.class</name>
+    <value>org.apache.tajo.catalog.store.PostgreSQLStore</value>
+  </property>
+  <property>
+    <name>tajo.catalog.jdbc.uri</name>
+    <value>jdbc:postgresql://<postgresql host name>:<postgresql port>/<database name for tajo>?createDatabaseIfNotExist=true</value>
+  </property>
+
+  <!-- Oracle -->
+  <property>
+    <name>tajo.catalog.store.class</name>
+    <value>org.apache.tajo.catalog.store.OracleStore</value>
+  </property>
+  <property>
+    <name>tajo.catalog.jdbc.uri</name>
+    <value>jdbc:oracle:thin:@//<oracle host name>:<oracle port>/<ServiceName for tajo database></value>
+  </property>
 
 ==================================
-  HCatalogStore Configuration
+HCatalogStore Configuration
 ==================================
 
 Tajo support HCatalogStore to integrate with hive. If you want to use HCatalogStore, you just do as follows.

http://git-wip-us.apache.org/repos/asf/tajo/blob/54b2c645/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
index b61d912..a2a9a23 100644
--- a/tajo-docs/src/main/sphinx/jdbc_driver.rst
+++ b/tajo-docs/src/main/sphinx/jdbc_driver.rst
@@ -53,7 +53,7 @@ The JDBC driver class name is ``org.apache.tajo.jdbc.TajoDriver``.
 You can get the driver ``Class.forName("org.apache.tajo.jdbc.TajoDriver")``.
 The connection url should be ``jdbc:tajo://<TajoMaster hostname>:<TajoMaster client rpc port>/<database name>``.
 The default TajoMaster client rpc port is ``26002``.
-If you want to change the listening port, please refer :doc:`/configuration/configuration_defaults`.
+If you want to change the listening port, please refer :doc:`/configuration/cluster_setup`.
 
 .. note::
   

http://git-wip-us.apache.org/repos/asf/tajo/blob/54b2c645/tajo-docs/src/main/sphinx/tsql/meta_command.rst
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/tsql/meta_command.rst b/tajo-docs/src/main/sphinx/tsql/meta_command.rst
index 15701fa..057124d 100644
--- a/tajo-docs/src/main/sphinx/tsql/meta_command.rst
+++ b/tajo-docs/src/main/sphinx/tsql/meta_command.rst
@@ -3,7 +3,7 @@ Meta Commands
 *********************************
 
 
-In tsql, any command that begins with an unquoted backslash ('\') is a tsql meta-command that is processed by tsql itself.
+In tsql, any 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: ::