From 90637e543e3806d1e8406037668d7f5d3a64c205 Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Tue, 6 Jan 2015 21:57:05 +0900 Subject: [PATCH 1/5] TAJO-1245 --- .../configuration/catalog_configuration.rst | 76 ++++++++++++++++++- 1 file changed, 74 insertions(+), 2 deletions(-) diff --git a/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst b/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst index acf05f9885..1c0d312019 100644 --- a/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst +++ b/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst @@ -78,7 +78,7 @@ And then, you need to prepare MySQL JDBC driver on the machine which can be ran .. code-block:: sh - export TAJO_CLASSPATH=/usr/local/mysql/lib/mysql-connector-java-x.x.x.jar + $ 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``. @@ -112,7 +112,7 @@ All configurations for using MariaDBStore is compatible with MySQLStore except f .. code-block:: sh - export TAJO_CLASSPATH=/usr/local/mariadb/lib/mariadb-java-client-x.x.x.jar + $ export TAJO_CLASSPATH=/usr/local/mariadb/lib/mariadb-java-client-x.x.x.jar .. code-block:: xml @@ -125,6 +125,78 @@ All configurations for using MariaDBStore is compatible with MySQLStore except f jdbc:mariadb://:/?createDatabaseIfNotExist=true +================================= +PostgreSQL Configuration +================================= + +1. Preparing the user and the database: + +.. code-block:: sql + + postgres=# create database tajo; + CREATE DATABASE + + postgres=# grant all on database tajo to tajo; + GRANT + +2. Preparing the JDBC driver: + +.. code-block:: sh + + $ export TAJO_CLASSPATH=/usr/share/java/postgresql-jdbc4.jar + +3. Configuring the catalog: + +.. code-block:: xml + + + tajo.catalog.store.class + org.apache.tajo.catalog.store.PostgreSQLStore + + + tajo.catalog.jdbc.uri + jdbc:postgresql://:/?createDatabaseIfNotExist=true + + + tajo.catalog.jdbc.connection.id + + + + tajo.catalog.jdbc.connection.password + + + +================================= +Oracle Configuration +================================= + +1. Preparing the JDBC driver: + +.. code-block:: sh + + $ export TAJO_CLASSPATH=/path/to/oracle/driver/ojdbc7.jar + +2. Configuring the catalog: + +.. code-block:: xml + + + tajo.catalog.store.class + org.apache.tajo.catalog.store.OracleStore + + + tajo.catalog.jdbc.uri + jdbc:oracle:thin:@//:/ + + + tajo.catalog.jdbc.connection.id + + + + tajo.catalog.jdbc.connection.password + + + ================================== HCatalogStore Configuration From e54a0014163af68a18d79493bf68066e37750fc0 Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Wed, 7 Jan 2015 00:11:50 +0900 Subject: [PATCH 2/5] TAJO-1245 --- .../configuration/catalog_configuration.rst | 109 +++++------------- 1 file changed, 29 insertions(+), 80 deletions(-) diff --git a/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst b/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst index 1c0d312019..41a74de319 100644 --- a/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst +++ b/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst @@ -57,10 +57,12 @@ 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 + (MySQL) $ 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``. + (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 + +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 - - tajo.catalog.store.class - org.apache.tajo.catalog.store.MySQLStore - tajo.catalog.jdbc.connection.id - + tajo.catalog.jdbc.connection.password - + + + + + + tajo.catalog.store.class + org.apache.tajo.catalog.store.MySQLStore tajo.catalog.jdbc.uri jdbc:mysql://:/?createDatabaseIfNotExist=true - -=========================== -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 - + tajo.catalog.store.class org.apache.tajo.catalog.store.MariaDBStore @@ -125,30 +127,7 @@ All configurations for using MariaDBStore is compatible with MySQLStore except f jdbc:mariadb://:/?createDatabaseIfNotExist=true -================================= -PostgreSQL Configuration -================================= - -1. Preparing the user and the database: - -.. code-block:: sql - - postgres=# create database tajo; - CREATE DATABASE - - postgres=# grant all on database tajo to tajo; - GRANT - -2. Preparing the JDBC driver: - -.. code-block:: sh - - $ export TAJO_CLASSPATH=/usr/share/java/postgresql-jdbc4.jar - -3. Configuring the catalog: - -.. code-block:: xml - + tajo.catalog.store.class org.apache.tajo.catalog.store.PostgreSQLStore @@ -157,29 +136,8 @@ PostgreSQL Configuration tajo.catalog.jdbc.uri jdbc:postgresql://:/?createDatabaseIfNotExist=true - - tajo.catalog.jdbc.connection.id - - - - tajo.catalog.jdbc.connection.password - - - -================================= -Oracle Configuration -================================= - -1. Preparing the JDBC driver: - -.. code-block:: sh - - $ export TAJO_CLASSPATH=/path/to/oracle/driver/ojdbc7.jar - -2. Configuring the catalog: - -.. code-block:: xml + tajo.catalog.store.class org.apache.tajo.catalog.store.OracleStore @@ -188,18 +146,9 @@ Oracle Configuration tajo.catalog.jdbc.uri jdbc:oracle:thin:@//:/ - - tajo.catalog.jdbc.connection.id - - - - tajo.catalog.jdbc.connection.password - - - ================================== - HCatalogStore Configuration +HCatalogStore Configuration ================================== Tajo support HCatalogStore to integrate with hive. If you want to use HCatalogStore, you just do as follows. From e7dbaf4d72302da8581a900208f1a7b5c397c394 Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Wed, 7 Jan 2015 12:42:13 +0900 Subject: [PATCH 3/5] Fix the compilation warning --- .../src/main/sphinx/configuration/catalog_configuration.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst b/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst index 41a74de319..9c3b6cf00b 100644 --- a/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst +++ b/tajo-docs/src/main/sphinx/configuration/catalog_configuration.rst @@ -56,9 +56,9 @@ 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. -========================= +================================================== MySQL/MariaDB/PostgreSQL/Oracle Configuration -========================= +================================================== 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. From 0b5b2217c451c0e1db3741afa003ff193a2c765d Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Wed, 7 Jan 2015 12:43:19 +0900 Subject: [PATCH 4/5] Missing a backslash character --- tajo-docs/src/main/sphinx/tsql/meta_command.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tajo-docs/src/main/sphinx/tsql/meta_command.rst b/tajo-docs/src/main/sphinx/tsql/meta_command.rst index 15701faf4e..057124d87e 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: :: From ab14b7333cad8bec2f77ae4d9bd0cf347c1c4ca0 Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Wed, 7 Jan 2015 12:47:01 +0900 Subject: [PATCH 5/5] Fix another compilation warning --- tajo-docs/src/main/sphinx/jdbc_driver.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tajo-docs/src/main/sphinx/jdbc_driver.rst b/tajo-docs/src/main/sphinx/jdbc_driver.rst index b61d9128c3..a2a9a235b3 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://:/``. 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::