From bcd5e8716f7695a89afd0c6051dc54ef4936b88c Mon Sep 17 00:00:00 2001 From: Jongyoung Park Date: Wed, 25 Nov 2015 15:27:20 +0900 Subject: [PATCH 1/4] explanation for table and tablespace is added --- .../sphinx/table_management/tablespaces.rst | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/tajo-docs/src/main/sphinx/table_management/tablespaces.rst b/tajo-docs/src/main/sphinx/table_management/tablespaces.rst index 79ea65f1f5..7d87b5c8ea 100644 --- a/tajo-docs/src/main/sphinx/table_management/tablespaces.rst +++ b/tajo-docs/src/main/sphinx/table_management/tablespaces.rst @@ -1,9 +1,25 @@ -************************************* +*********** Tablespaces -************************************* +*********** -Tablespaces in Tajo allow users to define locations in the storage system where the files or data objects representing database objects can be stored. Once defined, a tablespace can be referred to by name when creating a database or a table. Especially, it is very useful when a Tajo cluster instance should use heterogeneous storage systems such as HDFS, MySQL, and Oracle. +Tablespaces in Tajo allow users to define locations in the storage system where the files or data objects representing database objects can be stored. +Once defined, a tablespace can be referred to by name when creating a database or a table. +Especially, it is very useful when a Tajo cluster instance should use heterogeneous storage systems such as HDFS, MySQL, and Oracle. +============================================ +External Table, Managed Table and Tablespace +============================================ + +Tajo has two types of table. One is external table. It needs **location** property when the table is created. Using this property, you can create an external table indicating existing external data source. +For example, if there is already your data as Text/JSON files or HBase table, you can register it as tajo external table. +Other one is managed table, which means internal table, that is created in Tajo internal table space. You can convert external data to the form that you want and save it in managed table. +Tablespace is used for managed tables and it is a kind of alias represents physical(distributed, usually) storages. When managed table is created, you can specify a tablespace with **tablespace** keyword, or default tablespace will be used. + +.. note:: + + For creating a table, see :doc:`/sql_language/ddl`. + +============= Configuration ============= From d9b1a37d4a762126736f65228e08b87e632dc882 Mon Sep 17 00:00:00 2001 From: Jongyoung Park Date: Wed, 25 Nov 2015 15:33:27 +0900 Subject: [PATCH 2/4] paragraph is separated --- tajo-docs/src/main/sphinx/table_management/tablespaces.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/tajo-docs/src/main/sphinx/table_management/tablespaces.rst b/tajo-docs/src/main/sphinx/table_management/tablespaces.rst index 7d87b5c8ea..6a4cb1fa03 100644 --- a/tajo-docs/src/main/sphinx/table_management/tablespaces.rst +++ b/tajo-docs/src/main/sphinx/table_management/tablespaces.rst @@ -13,6 +13,7 @@ External Table, Managed Table and Tablespace Tajo has two types of table. One is external table. It needs **location** property when the table is created. Using this property, you can create an external table indicating existing external data source. For example, if there is already your data as Text/JSON files or HBase table, you can register it as tajo external table. Other one is managed table, which means internal table, that is created in Tajo internal table space. You can convert external data to the form that you want and save it in managed table. + Tablespace is used for managed tables and it is a kind of alias represents physical(distributed, usually) storages. When managed table is created, you can specify a tablespace with **tablespace** keyword, or default tablespace will be used. .. note:: From beef90239baa0033721d019ed5c35f33ca8f717b Mon Sep 17 00:00:00 2001 From: Jongyoung Park Date: Thu, 26 Nov 2015 13:48:14 +0900 Subject: [PATCH 3/4] refined --- tajo-docs/src/main/sphinx/table_management/tablespaces.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tajo-docs/src/main/sphinx/table_management/tablespaces.rst b/tajo-docs/src/main/sphinx/table_management/tablespaces.rst index 6a4cb1fa03..48f99dd008 100644 --- a/tajo-docs/src/main/sphinx/table_management/tablespaces.rst +++ b/tajo-docs/src/main/sphinx/table_management/tablespaces.rst @@ -12,9 +12,11 @@ External Table, Managed Table and Tablespace Tajo has two types of table. One is external table. It needs **location** property when the table is created. Using this property, you can create an external table indicating existing external data source. For example, if there is already your data as Text/JSON files or HBase table, you can register it as tajo external table. -Other one is managed table, which means internal table, that is created in Tajo internal table space. You can convert external data to the form that you want and save it in managed table. +Other one is managed table, which means internal table, that is created in a speficied tablespace. -Tablespace is used for managed tables and it is a kind of alias represents physical(distributed, usually) storages. When managed table is created, you can specify a tablespace with **tablespace** keyword, or default tablespace will be used. +Tablespace is a pre-defined physical location where data stored on. It is supported for only managed tables. +When you create a managed table, you can use the **tablespace** keyword to specify the location of data will be stored. +If the tablespace is not specified, the default tablespace of the table's database is used. Default tablespace is specified with **tajo.rootdir** and **tajo.warehouse.directory** in tajo-site.xml. .. note:: From 7c8aa7b65c1771f8dcda5f66088d6473d11a02a9 Mon Sep 17 00:00:00 2001 From: Jongyoung Park Date: Thu, 26 Nov 2015 14:35:36 +0900 Subject: [PATCH 4/4] Useless statement is removed --- tajo-docs/src/main/sphinx/table_management/tablespaces.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tajo-docs/src/main/sphinx/table_management/tablespaces.rst b/tajo-docs/src/main/sphinx/table_management/tablespaces.rst index 48f99dd008..6f43af1189 100644 --- a/tajo-docs/src/main/sphinx/table_management/tablespaces.rst +++ b/tajo-docs/src/main/sphinx/table_management/tablespaces.rst @@ -16,7 +16,7 @@ Other one is managed table, which means internal table, that is created in a spe Tablespace is a pre-defined physical location where data stored on. It is supported for only managed tables. When you create a managed table, you can use the **tablespace** keyword to specify the location of data will be stored. -If the tablespace is not specified, the default tablespace of the table's database is used. Default tablespace is specified with **tajo.rootdir** and **tajo.warehouse.directory** in tajo-site.xml. +If the tablespace is not specified, the default tablespace of the table's database is used. .. note::