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 2016/05/19 02:00:27 UTC
svn commit: r1744489 [30/43] - in /tajo/site/docs: 0.11.3/ 0.11.3/_sources/
0.11.3/_sources/backup_and_restore/ 0.11.3/_sources/configuration/
0.11.3/_sources/functions/ 0.11.3/_sources/index/
0.11.3/_sources/partitioning/ 0.11.3/_sources/sql_language/...
Added: tajo/site/docs/0.11.3/table_management/sequencefile.html
URL: http://svn.apache.org/viewvc/tajo/site/docs/0.11.3/table_management/sequencefile.html?rev=1744489&view=auto
==============================================================================
--- tajo/site/docs/0.11.3/table_management/sequencefile.html (added)
+++ tajo/site/docs/0.11.3/table_management/sequencefile.html Thu May 19 02:00:25 2016
@@ -0,0 +1,371 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <title>SequenceFile — Apache Tajo 0.11.3 documentation</title>
+
+
+
+
+
+
+ <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
+
+
+
+
+
+
+
+
+
+ <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+
+
+
+ <link rel="top" title="Apache Tajo 0.11.3 documentation" href="../index.html"/>
+ <link rel="up" title="Data Formats" href="data_formats.html"/>
+ <link rel="next" title="Compression" href="compression.html"/>
+ <link rel="prev" title="ORC" href="orc.html"/>
+
+
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav" role="document">
+
+ <div class="wy-grid-for-nav">
+
+
+ <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+ <div class="wy-side-nav-search">
+ <a href="../index.html" class="fa fa-home"> Apache Tajo</a>
+ <div role="search">
+ <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
+ <input type="text" name="q" placeholder="Search docs" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+</div>
+ </div>
+
+ <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+
+
+ <ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#prerequisites">Prerequisites</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#dowload-and-unpack-the-source-code">Dowload and unpack the source code</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#build-source-code">Build source code</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#setting-up-a-local-tajo-cluster">Setting up a local Tajo cluster</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#first-query-execution">First query execution</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../configuration.html">Configuration</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/preliminary.html">Preliminary</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/cluster_setup.html">Cluster Setup</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/tajo_master_configuration.html">Tajo Master Configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/worker_configuration.html">Worker Configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/catalog_configuration.html">Catalog Configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/ha_configuration.html">High Availability for TajoMaster</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/service_config_defaults.html">Cluster Service Configuration Defaults</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/tajo-site-xml.html">The tajo-site.xml File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/catalog-site-xml.html">The catalog-site.xml File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/storage-site-json.html">The storage-site.json File</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../tsql.html">Tajo Shell (TSQL)</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/meta_command.html">Meta Commands</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/dfs_command.html">Executing HDFS commands</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/variables.html">Session Variables</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/admin_command.html">Administration Commands</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/intro.html">Introducing to TSQL</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/single_command.html">Executing a single command</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/execute_file.html">Executing Queries from Files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/background_command.html">Executing as background process</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../sql_language.html">SQL Language</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/data_model.html">Data Model</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/ddl.html">Data Definition Language</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/insert.html">INSERT (OVERWRITE) INTO</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/alter_table.html">ALTER TABLE</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/queries.html">Queries</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/joins.html">Joins</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/sql_expression.html">SQL Expressions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/predicates.html">Predicates</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/explain.html">EXPLAIN</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../time_zone.html">Time Zone</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#server-cluster-time-zone">Server Cluster Time Zone</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#table-time-zone">Table Time Zone</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#client-time-zone">Client Time Zone</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#time-zone-id">Time Zone ID</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#examples-of-time-zone">Examples of Time Zone</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../functions.html">Functions</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#built-in-scalar-functions">Built-in Scalar Functions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#built-in-aggregation-functions">Built-in Aggregation Functions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#built-in-window-functions">Built-in Window Functions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#user-defined-functions">User-defined Functions</a></li>
+</ul>
+</li>
+<li class="toctree-l1 current"><a class="reference internal" href="../table_management.html">Table Management</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="table_overview.html">Overview of Tajo Tables</a></li>
+<li class="toctree-l2"><a class="reference internal" href="tablespaces.html">Tablespaces</a></li>
+<li class="toctree-l2 current"><a class="reference internal" href="data_formats.html">Data Formats</a></li>
+<li class="toctree-l2"><a class="reference internal" href="compression.html">Compression</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../table_partitioning.html">Table Partitioning</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/intro_to_partitioning.html">Introduction to Partitioning</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/column_partitioning.html">Column Partitioning</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/range_partitioning.html">Range Partitioning</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/hash_partitioning.html">Hash Partitioning</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../storage_plugins.html">Storage Plugin</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../storage_plugins/overview.html">Storage Plugin Overview</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../storage_plugins/postgresql.html">PostgreSQL Storage Handler</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../index_overview.html">Index (Experimental Feature)</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../index/types.html">Index Types</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../index/how_to_use.html">How to use index?</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../index/future_work.html">Future Works</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../backup_and_restore.html">Backup and Restore</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../backup_and_restore/catalog.html">Backup and Restore Catalog</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../hive_integration.html">Hive Integration</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../hbase_integration.html">HBase Integration</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#create-table">CREATE TABLE</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#drop-table">DROP TABLE</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#insert-overwrite-into">INSERT (OVERWRITE) INTO</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#usage">Usage</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../swift_integration.html">OpenStack Swift Integration</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#swift-configuration">Swift configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#hadoop-configurations">Hadoop configurations</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#tajo-configuration">Tajo configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#querying-on-swift">Querying on Swift</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../jdbc_driver.html">Tajo JDBC Driver</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#how-to-get-jdbc-driver">How to get JDBC driver</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#setting-the-classpath">Setting the CLASSPATH</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#connecting-to-the-tajo-cluster-instance">Connecting to the Tajo cluster instance</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#connection-parameters">Connection Parameters</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#an-example-jdbc-client">An Example JDBC Client</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../tajo_client_api.html">Tajo Client API</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
+</ul>
+
+
+ </div>
+
+ </nav>
+
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+
+ <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+ <a href="../index.html">Apache Tajo</a>
+ </nav>
+
+
+
+ <div class="wy-nav-content">
+ <div class="rst-content">
+ <div role="navigation" aria-label="breadcrumbs navigation">
+ <ul class="wy-breadcrumbs">
+ <li><a href="../index.html">Docs</a> »</li>
+
+ <li><a href="../table_management.html">Table Management</a> »</li>
+
+ <li><a href="data_formats.html">Data Formats</a> »</li>
+
+ <li>SequenceFile</li>
+ <li class="wy-breadcrumbs-aside">
+
+ <a href="../_sources/table_management/sequencefile.txt" rel="nofollow"> View page source</a>
+
+ </li>
+ </ul>
+ <hr/>
+</div>
+ <div role="main">
+
+ <div class="section" id="sequencefile">
+<h1>SequenceFile<a class="headerlink" href="#sequencefile" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="introduce">
+<h2>Introduce<a class="headerlink" href="#introduce" title="Permalink to this headline">¶</a></h2>
+<p>SequenceFiles are flat files consisting of binary key/value pairs.
+SequenceFile is basic file format which provided by Hadoop, and Hive also provides it to create a table.</p>
+<p>The <tt class="docutils literal"><span class="pre">USING</span> <span class="pre">sequencefile</span></tt> keywords let you create a SequecneFile. Here is an example statement to create a table using <tt class="docutils literal"><span class="pre">SequecneFile</span></tt>:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span><span class="n">id</span> <span class="nb">int</span><span class="p">,</span> <span class="n">name</span> <span class="nb">text</span><span class="p">,</span> <span class="n">score</span> <span class="nb">float</span><span class="p">,</span> <span class="k">type</span> <span class="nb">text</span><span class="p">)</span>
+<span class="k">USING</span> <span class="n">sequencefile</span><span class="p">;</span>
+</pre></div>
+</div>
+<p>Also Tajo provides Hive compatibility for SequenceFile. The above statement can be written in Hive as follows:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span><span class="n">id</span> <span class="nb">int</span><span class="p">,</span> <span class="n">name</span> <span class="n">string</span><span class="p">,</span> <span class="n">score</span> <span class="nb">float</span><span class="p">,</span> <span class="k">type</span> <span class="n">string</span><span class="p">)</span>
+<span class="n">STORED</span> <span class="k">AS</span> <span class="n">sequencefile</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="serializerdeserializer-serde">
+<h2>SerializerDeserializer (SerDe)<a class="headerlink" href="#serializerdeserializer-serde" title="Permalink to this headline">¶</a></h2>
+<p>There are two SerDe for SequenceFile as follows:</p>
+<blockquote>
+<div><ul class="simple">
+<li>TextSerializerDeserializer: This class can read and write data in plain text file format.</li>
+<li>BinarySerializerDeserializer: This class can read and write data in binary file format.</li>
+</ul>
+</div></blockquote>
+<p>The default is the SerDe for plain text file in Tajo. The above example statement created the table using TextSerializerDeserializer.If you want to use BinarySerializerDeserializer, you can specify it by <tt class="docutils literal"><span class="pre">sequencefile.serde</span></tt> keywords:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span><span class="n">id</span> <span class="nb">int</span><span class="p">,</span> <span class="n">name</span> <span class="nb">text</span><span class="p">,</span> <span class="n">score</span> <span class="nb">float</span><span class="p">,</span> <span class="k">type</span> <span class="nb">text</span><span class="p">)</span>
+<span class="k">USING</span> <span class="n">sequencefile</span> <span class="k">with</span> <span class="p">(</span><span class="s1">'sequencefile.serde'</span><span class="o">=</span><span class="s1">'org.apache.tajo.storage.BinarySerializerDeserializer'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>In Hive, the above statement can be written in Hive as follows:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span><span class="n">id</span> <span class="nb">int</span><span class="p">,</span> <span class="n">name</span> <span class="n">string</span><span class="p">,</span> <span class="n">score</span> <span class="nb">float</span><span class="p">,</span> <span class="k">type</span> <span class="n">string</span><span class="p">)</span>
+<span class="k">ROW</span> <span class="n">FORMAT</span> <span class="n">SERDE</span>
+ <span class="s1">'org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe'</span>
+<span class="n">STORED</span> <span class="k">AS</span> <span class="n">sequencefile</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="writer">
+<h2>Writer<a class="headerlink" href="#writer" title="Permalink to this headline">¶</a></h2>
+<p>There are three SequenceFile Writers based on the SequenceFile.CompressionType used to compress key/value pairs:</p>
+<blockquote>
+<div><ul class="simple">
+<li>Writer : Uncompressed records.</li>
+<li>RecordCompressWriter : Record-compressed files, only compress values.</li>
+<li>BlockCompressWriter : Block-compressed files, both keys & values are collected in ‘blocks’ separately and compressed. The size of the ‘block’ is configurable.</li>
+</ul>
+</div></blockquote>
+<p>The default is Uncompressed Writer in Tajo. If you want to use RecordCompressWriter, you can specify it by <tt class="docutils literal"><span class="pre">compression.type</span></tt> keywords and <tt class="docutils literal"><span class="pre">compression.codec</span></tt> keywords:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span><span class="n">id</span> <span class="nb">int</span><span class="p">,</span> <span class="n">name</span> <span class="nb">text</span><span class="p">,</span> <span class="n">score</span> <span class="nb">float</span><span class="p">,</span> <span class="k">type</span> <span class="nb">text</span><span class="p">)</span>
+<span class="k">USING</span> <span class="n">sequencefile</span> <span class="k">with</span> <span class="p">(</span><span class="s1">'compression.type'</span><span class="o">=</span><span class="s1">'RECORD'</span><span class="p">,</span><span class="s1">'compression.codec'</span><span class="o">=</span><span class="s1">'org.apache.hadoop.io.compress.SnappyCodec'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>In hive, you need to specify settings as follows:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="n">hive</span><span class="o">></span> <span class="k">SET</span> <span class="n">hive</span><span class="p">.</span><span class="k">exec</span><span class="p">.</span><span class="n">compress</span><span class="p">.</span><span class="k">output</span> <span class="o">=</span> <span class="k">true</span><span class="p">;</span>
+<span class="n">hive</span><span class="o">></span> <span class="k">SET</span> <span class="n">mapred</span><span class="p">.</span><span class="k">output</span><span class="p">.</span><span class="n">compression</span><span class="p">.</span><span class="k">type</span> <span class="o">=</span> <span class="n">RECORD</span><span class="p">;</span>
+<span class="n">hive</span><span class="o">></span> <span class="k">SET</span> <span class="n">mapred</span><span class="p">.</span><span class="k">output</span><span class="p">.</span><span class="n">compression</span><span class="p">.</span><span class="n">codec</span> <span class="o">=</span> <span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">hadoop</span><span class="p">.</span><span class="n">io</span><span class="p">.</span><span class="n">compress</span><span class="p">.</span><span class="n">SnappyCodec</span><span class="p">;</span>
+<span class="n">hive</span><span class="o">></span> <span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span><span class="n">id</span> <span class="nb">int</span><span class="p">,</span> <span class="n">name</span> <span class="n">string</span><span class="p">,</span> <span class="n">score</span> <span class="nb">float</span><span class="p">,</span> <span class="k">type</span> <span class="n">string</span><span class="p">)</span> <span class="n">STORED</span> <span class="k">AS</span> <span class="n">sequencefile</span><span class="p">;;</span>
+</pre></div>
+</div>
+<p>And if you want to use BlockCompressWriter, you can specify it by <tt class="docutils literal"><span class="pre">compression.type</span></tt> keywords and <tt class="docutils literal"><span class="pre">compression.codec</span></tt> keywords:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span><span class="n">id</span> <span class="nb">int</span><span class="p">,</span> <span class="n">name</span> <span class="nb">text</span><span class="p">,</span> <span class="n">score</span> <span class="nb">float</span><span class="p">,</span> <span class="k">type</span> <span class="nb">text</span><span class="p">)</span>
+<span class="k">USING</span> <span class="n">sequencefile</span> <span class="k">with</span> <span class="p">(</span><span class="s1">'compression.type'</span><span class="o">=</span><span class="s1">'BLOCK'</span><span class="p">,</span><span class="s1">'compression.codec'</span><span class="o">=</span><span class="s1">'org.apache.hadoop.io.compress.SnappyCodec'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>In hive, you need to specify settings as follows:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="n">hive</span><span class="o">></span> <span class="k">SET</span> <span class="n">hive</span><span class="p">.</span><span class="k">exec</span><span class="p">.</span><span class="n">compress</span><span class="p">.</span><span class="k">output</span> <span class="o">=</span> <span class="k">true</span><span class="p">;</span>
+<span class="n">hive</span><span class="o">></span> <span class="k">SET</span> <span class="n">mapred</span><span class="p">.</span><span class="k">output</span><span class="p">.</span><span class="n">compression</span><span class="p">.</span><span class="k">type</span> <span class="o">=</span> <span class="n">BLOCK</span><span class="p">;</span>
+<span class="n">hive</span><span class="o">></span> <span class="k">SET</span> <span class="n">mapred</span><span class="p">.</span><span class="k">output</span><span class="p">.</span><span class="n">compression</span><span class="p">.</span><span class="n">codec</span> <span class="o">=</span> <span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">hadoop</span><span class="p">.</span><span class="n">io</span><span class="p">.</span><span class="n">compress</span><span class="p">.</span><span class="n">SnappyCodec</span><span class="p">;</span>
+<span class="n">hive</span><span class="o">></span> <span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span><span class="n">id</span> <span class="nb">int</span><span class="p">,</span> <span class="n">name</span> <span class="n">string</span><span class="p">,</span> <span class="n">score</span> <span class="nb">float</span><span class="p">,</span> <span class="k">type</span> <span class="n">string</span><span class="p">)</span> <span class="n">STORED</span> <span class="k">AS</span> <span class="n">sequencefile</span><span class="p">;;</span>
+</pre></div>
+</div>
+<p>For reference, you can use TextSerDe or BinarySerDe with compression keywords.
+Here is an example statement for this case.</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span><span class="n">id</span> <span class="nb">int</span><span class="p">,</span> <span class="n">name</span> <span class="nb">text</span><span class="p">,</span> <span class="n">score</span> <span class="nb">float</span><span class="p">,</span> <span class="k">type</span> <span class="nb">text</span><span class="p">)</span>
+<span class="k">USING</span> <span class="n">sequencefile</span> <span class="k">with</span> <span class="p">(</span><span class="s1">'sequencefile.serde'</span><span class="o">=</span><span class="s1">'org.apache.tajo.storage.BinarySerializerDeserializer'</span><span class="p">,</span> <span class="s1">'compression.type'</span><span class="o">=</span><span class="s1">'BLOCK'</span><span class="p">,</span><span class="s1">'compression.codec'</span><span class="o">=</span><span class="s1">'org.apache.hadoop.io.compress.SnappyCodec'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>In hive, you need to specify settings as follows:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="n">hive</span><span class="o">></span> <span class="k">SET</span> <span class="n">hive</span><span class="p">.</span><span class="k">exec</span><span class="p">.</span><span class="n">compress</span><span class="p">.</span><span class="k">output</span> <span class="o">=</span> <span class="k">true</span><span class="p">;</span>
+<span class="n">hive</span><span class="o">></span> <span class="k">SET</span> <span class="n">mapred</span><span class="p">.</span><span class="k">output</span><span class="p">.</span><span class="n">compression</span><span class="p">.</span><span class="k">type</span> <span class="o">=</span> <span class="n">BLOCK</span><span class="p">;</span>
+<span class="n">hive</span><span class="o">></span> <span class="k">SET</span> <span class="n">mapred</span><span class="p">.</span><span class="k">output</span><span class="p">.</span><span class="n">compression</span><span class="p">.</span><span class="n">codec</span> <span class="o">=</span> <span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">hadoop</span><span class="p">.</span><span class="n">io</span><span class="p">.</span><span class="n">compress</span><span class="p">.</span><span class="n">SnappyCodec</span><span class="p">;</span>
+<span class="n">hive</span><span class="o">></span> <span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span><span class="n">id</span> <span class="nb">int</span><span class="p">,</span> <span class="n">name</span> <span class="n">string</span><span class="p">,</span> <span class="n">score</span> <span class="nb">float</span><span class="p">,</span> <span class="k">type</span> <span class="n">string</span><span class="p">)</span>
+ <span class="k">ROW</span> <span class="n">FORMAT</span> <span class="n">SERDE</span>
+ <span class="s1">'org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe'</span>
+ <span class="n">STORED</span> <span class="k">AS</span> <span class="n">sequencefile</span><span class="p">;;</span>
+</pre></div>
+</div>
+</div>
+</div>
+
+
+ </div>
+ <footer>
+
+ <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+
+ <a href="compression.html" class="btn btn-neutral float-right" title="Compression"/>Next <span class="fa fa-arrow-circle-right"></span></a>
+
+
+ <a href="orc.html" class="btn btn-neutral" title="ORC"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+
+ </div>
+
+
+ <hr/>
+
+ <div role="contentinfo">
+ <p>
+ © Copyright 2016, Apache Tajo Team.
+ </p>
+ </div>
+
+ <a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>
+</footer>
+ </div>
+ </div>
+
+ </section>
+
+ </div>
+
+
+
+
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT:'../',
+ VERSION:'0.11.3',
+ COLLAPSE_INDEX:false,
+ FILE_SUFFIX:'.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+
+
+
+
+
+ <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+
+
+
+ <script type="text/javascript">
+ jQuery(function () {
+ SphinxRtdTheme.StickyNav.enable();
+ });
+ </script>
+
+
+</body>
+</html>
\ No newline at end of file
Added: tajo/site/docs/0.11.3/table_management/table_overview.html
URL: http://svn.apache.org/viewvc/tajo/site/docs/0.11.3/table_management/table_overview.html?rev=1744489&view=auto
==============================================================================
--- tajo/site/docs/0.11.3/table_management/table_overview.html (added)
+++ tajo/site/docs/0.11.3/table_management/table_overview.html Thu May 19 02:00:25 2016
@@ -0,0 +1,357 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <title>Overview of Tajo Tables — Apache Tajo 0.11.3 documentation</title>
+
+
+
+
+
+
+ <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
+
+
+
+
+
+
+
+
+
+ <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+
+
+
+ <link rel="top" title="Apache Tajo 0.11.3 documentation" href="../index.html"/>
+ <link rel="up" title="Table Management" href="../table_management.html"/>
+ <link rel="next" title="Tablespaces" href="tablespaces.html"/>
+ <link rel="prev" title="Table Management" href="../table_management.html"/>
+
+
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav" role="document">
+
+ <div class="wy-grid-for-nav">
+
+
+ <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+ <div class="wy-side-nav-search">
+ <a href="../index.html" class="fa fa-home"> Apache Tajo</a>
+ <div role="search">
+ <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
+ <input type="text" name="q" placeholder="Search docs" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+</div>
+ </div>
+
+ <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+
+
+ <ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#prerequisites">Prerequisites</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#dowload-and-unpack-the-source-code">Dowload and unpack the source code</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#build-source-code">Build source code</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#setting-up-a-local-tajo-cluster">Setting up a local Tajo cluster</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#first-query-execution">First query execution</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../configuration.html">Configuration</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/preliminary.html">Preliminary</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/cluster_setup.html">Cluster Setup</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/tajo_master_configuration.html">Tajo Master Configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/worker_configuration.html">Worker Configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/catalog_configuration.html">Catalog Configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/ha_configuration.html">High Availability for TajoMaster</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/service_config_defaults.html">Cluster Service Configuration Defaults</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/tajo-site-xml.html">The tajo-site.xml File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/catalog-site-xml.html">The catalog-site.xml File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/storage-site-json.html">The storage-site.json File</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../tsql.html">Tajo Shell (TSQL)</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/meta_command.html">Meta Commands</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/dfs_command.html">Executing HDFS commands</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/variables.html">Session Variables</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/admin_command.html">Administration Commands</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/intro.html">Introducing to TSQL</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/single_command.html">Executing a single command</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/execute_file.html">Executing Queries from Files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/background_command.html">Executing as background process</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../sql_language.html">SQL Language</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/data_model.html">Data Model</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/ddl.html">Data Definition Language</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/insert.html">INSERT (OVERWRITE) INTO</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/alter_table.html">ALTER TABLE</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/queries.html">Queries</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/joins.html">Joins</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/sql_expression.html">SQL Expressions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/predicates.html">Predicates</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/explain.html">EXPLAIN</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../time_zone.html">Time Zone</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#server-cluster-time-zone">Server Cluster Time Zone</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#table-time-zone">Table Time Zone</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#client-time-zone">Client Time Zone</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#time-zone-id">Time Zone ID</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#examples-of-time-zone">Examples of Time Zone</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../functions.html">Functions</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#built-in-scalar-functions">Built-in Scalar Functions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#built-in-aggregation-functions">Built-in Aggregation Functions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#built-in-window-functions">Built-in Window Functions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#user-defined-functions">User-defined Functions</a></li>
+</ul>
+</li>
+<li class="toctree-l1 current"><a class="reference internal" href="../table_management.html">Table Management</a><ul class="current">
+<li class="toctree-l2 current"><a class="current reference internal" href="">Overview of Tajo Tables</a></li>
+<li class="toctree-l2"><a class="reference internal" href="tablespaces.html">Tablespaces</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data_formats.html">Data Formats</a></li>
+<li class="toctree-l2"><a class="reference internal" href="compression.html">Compression</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../table_partitioning.html">Table Partitioning</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/intro_to_partitioning.html">Introduction to Partitioning</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/column_partitioning.html">Column Partitioning</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/range_partitioning.html">Range Partitioning</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/hash_partitioning.html">Hash Partitioning</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../storage_plugins.html">Storage Plugin</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../storage_plugins/overview.html">Storage Plugin Overview</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../storage_plugins/postgresql.html">PostgreSQL Storage Handler</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../index_overview.html">Index (Experimental Feature)</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../index/types.html">Index Types</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../index/how_to_use.html">How to use index?</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../index/future_work.html">Future Works</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../backup_and_restore.html">Backup and Restore</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../backup_and_restore/catalog.html">Backup and Restore Catalog</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../hive_integration.html">Hive Integration</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../hbase_integration.html">HBase Integration</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#create-table">CREATE TABLE</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#drop-table">DROP TABLE</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#insert-overwrite-into">INSERT (OVERWRITE) INTO</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#usage">Usage</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../swift_integration.html">OpenStack Swift Integration</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#swift-configuration">Swift configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#hadoop-configurations">Hadoop configurations</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#tajo-configuration">Tajo configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#querying-on-swift">Querying on Swift</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../jdbc_driver.html">Tajo JDBC Driver</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#how-to-get-jdbc-driver">How to get JDBC driver</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#setting-the-classpath">Setting the CLASSPATH</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#connecting-to-the-tajo-cluster-instance">Connecting to the Tajo cluster instance</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#connection-parameters">Connection Parameters</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#an-example-jdbc-client">An Example JDBC Client</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../tajo_client_api.html">Tajo Client API</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
+</ul>
+
+
+ </div>
+
+ </nav>
+
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+
+ <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+ <a href="../index.html">Apache Tajo</a>
+ </nav>
+
+
+
+ <div class="wy-nav-content">
+ <div class="rst-content">
+ <div role="navigation" aria-label="breadcrumbs navigation">
+ <ul class="wy-breadcrumbs">
+ <li><a href="../index.html">Docs</a> »</li>
+
+ <li><a href="../table_management.html">Table Management</a> »</li>
+
+ <li>Overview of Tajo Tables</li>
+ <li class="wy-breadcrumbs-aside">
+
+ <a href="../_sources/table_management/table_overview.txt" rel="nofollow"> View page source</a>
+
+ </li>
+ </ul>
+ <hr/>
+</div>
+ <div role="main">
+
+ <div class="section" id="overview-of-tajo-tables">
+<h1>Overview of Tajo Tables<a class="headerlink" href="#overview-of-tajo-tables" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="overview">
+<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h2>
+</div>
+<div class="section" id="tablespaces">
+<h2>Tablespaces<a class="headerlink" href="#tablespaces" title="Permalink to this headline">¶</a></h2>
+<p>Tablespaces is a physical location where files or data objects representing data rows can be stored. Once defined, a tablespace can be referred to by a 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 because each tablespace can be specified to use a different storage system.</p>
+<p>Please refer to <a class="reference internal" href="tablespaces.html"><em>Tablespaces</em></a> if you want to know more information about tablespaces.</p>
+</div>
+<div class="section" id="managed-table">
+<h2>Managed Table<a class="headerlink" href="#managed-table" title="Permalink to this headline">¶</a></h2>
+<p><tt class="docutils literal"><span class="pre">CREATE</span> <span class="pre">TABLE</span></tt> statement lets you create a table located in the warehouse directory specified by the configuration property <tt class="docutils literal"><span class="pre">tajo.warehouse.directory</span></tt> or <tt class="docutils literal"><span class="pre">${tajo.root}/warehouse</span></tt> by default. For example:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">employee</span> <span class="p">(</span>
+ <span class="n">id</span> <span class="nb">int</span><span class="p">,</span>
+ <span class="n">name</span> <span class="nb">text</span><span class="p">,</span>
+ <span class="n">age</span>
+<span class="p">);</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="external-table">
+<h2>External Table<a class="headerlink" href="#external-table" title="Permalink to this headline">¶</a></h2>
+<p><tt class="docutils literal"><span class="pre">CREATE</span> <span class="pre">EXTERNAL</span> <span class="pre">TABLE</span></tt> statement lets you create a table located in a specify location so that Tajo does not use a default data warehouse location for the table. External tables are in common used if you already have data generated. LOCATION clause must be required for an external table.</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">EXTERNAL</span> <span class="k">TABLE</span> <span class="n">employee</span> <span class="p">(</span>
+ <span class="n">id</span> <span class="nb">int</span><span class="p">,</span>
+ <span class="n">name</span> <span class="nb">text</span><span class="p">,</span>
+ <span class="n">age</span>
+<span class="p">)</span> <span class="k">LOCATION</span> <span class="s1">'hdfs://table/path'</span><span class="p">;</span>
+</pre></div>
+</div>
+<p>The location can be a directory located in HDFS, Amazon S3, HBase, or local file system (if a Tajo cluster runs in a single machine). URI examples are as follows:</p>
+<blockquote>
+<div><ul class="simple">
+<li>HDFS - <tt class="docutils literal"><span class="pre">hdfs://hostname:8020/table1</span></tt></li>
+<li>Amazon S3 - <tt class="docutils literal"><span class="pre">s3://bucket-name/table1</span></tt></li>
+<li>local file system - <tt class="docutils literal"><span class="pre">file:///dir/table1</span></tt></li>
+<li>Openstack Swift - <tt class="docutils literal"><span class="pre">swift://bucket-name/table1</span></tt></li>
+</ul>
+</div></blockquote>
+<div class="section" id="table-properties">
+<h3>Table Properties<a class="headerlink" href="#table-properties" title="Permalink to this headline">¶</a></h3>
+<p>All table formats provide parameters for enabling or disabling features and adjusting physical parameters.
+The <tt class="docutils literal"><span class="pre">WITH</span></tt> clause in the CREATE TABLE statement allows users to set those properties.</p>
+<p>The following example is to set a custom field delimiter, NULL character, and compression codec:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span>
+ <span class="n">id</span> <span class="nb">int</span><span class="p">,</span>
+ <span class="n">name</span> <span class="nb">text</span><span class="p">,</span>
+ <span class="n">score</span> <span class="nb">float</span><span class="p">,</span>
+ <span class="k">type</span> <span class="nb">text</span>
+<span class="p">)</span> <span class="k">USING</span> <span class="nb">TEXT</span> <span class="k">WITH</span><span class="p">(</span><span class="s1">'text.delimiter'</span><span class="o">=</span><span class="s1">'\u0001'</span><span class="p">,</span>
+ <span class="s1">'text.null'</span><span class="o">=</span><span class="s1">'\\N'</span><span class="p">,</span>
+ <span class="s1">'compression.codec'</span><span class="o">=</span><span class="s1">'org.apache.hadoop.io.compress.SnappyCodec'</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>Each physical table layout has its own specialized properties. They will be addressed in <a class="reference internal" href="data_formats.html"><em>Data Formats</em></a>.</p>
+</div>
+<div class="section" id="common-table-properties">
+<h3>Common Table Properties<a class="headerlink" href="#common-table-properties" title="Permalink to this headline">¶</a></h3>
+<p>There are some common table properties which are used in most tables.</p>
+<div class="section" id="compression">
+<h4>Compression<a class="headerlink" href="#compression" title="Permalink to this headline">¶</a></h4>
+<p>See <a class="reference internal" href="compression.html"><em>Compression</em></a>.</p>
+</div>
+<div class="section" id="time-zone">
+<h4>Time zone<a class="headerlink" href="#time-zone" title="Permalink to this headline">¶</a></h4>
+<p>In Tajo, a table property <tt class="docutils literal"><span class="pre">timezone</span></tt> allows users to specify a time zone that the table uses for reading or writing.</p>
+<p>You can specify a table time zone as follows:</p>
+<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">EXTERNAL</span> <span class="k">TABLE</span> <span class="n">table1</span> <span class="p">(</span>
+ <span class="n">t_timestamp</span> <span class="k">TIMESTAMP</span><span class="p">,</span>
+ <span class="n">t_date</span> <span class="nb">DATE</span>
+<span class="p">)</span> <span class="k">USING</span> <span class="nb">TEXT</span> <span class="k">WITH</span><span class="p">(</span><span class="s1">'timezone'</span><span class="o">=</span><span class="s1">'ASIA/Seoul'</span><span class="p">)</span> <span class="k">LOCATION</span> <span class="s1">'/path-to-table/'</span>
+</pre></div>
+</div>
+<p>In order to learn time zone, please refer to <a class="reference internal" href="../time_zone.html"><em>Time Zone</em></a>.</p>
+</div>
+</div>
+</div>
+</div>
+
+
+ </div>
+ <footer>
+
+ <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+
+ <a href="tablespaces.html" class="btn btn-neutral float-right" title="Tablespaces"/>Next <span class="fa fa-arrow-circle-right"></span></a>
+
+
+ <a href="../table_management.html" class="btn btn-neutral" title="Table Management"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+
+ </div>
+
+
+ <hr/>
+
+ <div role="contentinfo">
+ <p>
+ © Copyright 2016, Apache Tajo Team.
+ </p>
+ </div>
+
+ <a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>
+</footer>
+ </div>
+ </div>
+
+ </section>
+
+ </div>
+
+
+
+
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT:'../',
+ VERSION:'0.11.3',
+ COLLAPSE_INDEX:false,
+ FILE_SUFFIX:'.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+
+
+
+
+
+ <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+
+
+
+ <script type="text/javascript">
+ jQuery(function () {
+ SphinxRtdTheme.StickyNav.enable();
+ });
+ </script>
+
+
+</body>
+</html>
\ No newline at end of file
Added: tajo/site/docs/0.11.3/table_management/tablespaces.html
URL: http://svn.apache.org/viewvc/tajo/site/docs/0.11.3/table_management/tablespaces.html?rev=1744489&view=auto
==============================================================================
--- tajo/site/docs/0.11.3/table_management/tablespaces.html (added)
+++ tajo/site/docs/0.11.3/table_management/tablespaces.html Thu May 19 02:00:25 2016
@@ -0,0 +1,333 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <title>Tablespaces — Apache Tajo 0.11.3 documentation</title>
+
+
+
+
+
+
+ <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
+
+
+
+
+
+
+
+
+
+ <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+
+
+
+ <link rel="top" title="Apache Tajo 0.11.3 documentation" href="../index.html"/>
+ <link rel="up" title="Table Management" href="../table_management.html"/>
+ <link rel="next" title="Data Formats" href="data_formats.html"/>
+ <link rel="prev" title="Overview of Tajo Tables" href="table_overview.html"/>
+
+
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav" role="document">
+
+ <div class="wy-grid-for-nav">
+
+
+ <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+ <div class="wy-side-nav-search">
+ <a href="../index.html" class="fa fa-home"> Apache Tajo</a>
+ <div role="search">
+ <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
+ <input type="text" name="q" placeholder="Search docs" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+</div>
+ </div>
+
+ <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+
+
+ <ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#prerequisites">Prerequisites</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#dowload-and-unpack-the-source-code">Dowload and unpack the source code</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#build-source-code">Build source code</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#setting-up-a-local-tajo-cluster">Setting up a local Tajo cluster</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#first-query-execution">First query execution</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../configuration.html">Configuration</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/preliminary.html">Preliminary</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/cluster_setup.html">Cluster Setup</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/tajo_master_configuration.html">Tajo Master Configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/worker_configuration.html">Worker Configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/catalog_configuration.html">Catalog Configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/ha_configuration.html">High Availability for TajoMaster</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/service_config_defaults.html">Cluster Service Configuration Defaults</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/tajo-site-xml.html">The tajo-site.xml File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/catalog-site-xml.html">The catalog-site.xml File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../configuration/storage-site-json.html">The storage-site.json File</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../tsql.html">Tajo Shell (TSQL)</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/meta_command.html">Meta Commands</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/dfs_command.html">Executing HDFS commands</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/variables.html">Session Variables</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/admin_command.html">Administration Commands</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/intro.html">Introducing to TSQL</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/single_command.html">Executing a single command</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/execute_file.html">Executing Queries from Files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../tsql/background_command.html">Executing as background process</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../sql_language.html">SQL Language</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/data_model.html">Data Model</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/ddl.html">Data Definition Language</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/insert.html">INSERT (OVERWRITE) INTO</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/alter_table.html">ALTER TABLE</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/queries.html">Queries</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/joins.html">Joins</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/sql_expression.html">SQL Expressions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/predicates.html">Predicates</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../sql_language/explain.html">EXPLAIN</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../time_zone.html">Time Zone</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#server-cluster-time-zone">Server Cluster Time Zone</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#table-time-zone">Table Time Zone</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#client-time-zone">Client Time Zone</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#time-zone-id">Time Zone ID</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../time_zone.html#examples-of-time-zone">Examples of Time Zone</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../functions.html">Functions</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#built-in-scalar-functions">Built-in Scalar Functions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#built-in-aggregation-functions">Built-in Aggregation Functions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#built-in-window-functions">Built-in Window Functions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../functions.html#user-defined-functions">User-defined Functions</a></li>
+</ul>
+</li>
+<li class="toctree-l1 current"><a class="reference internal" href="../table_management.html">Table Management</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="table_overview.html">Overview of Tajo Tables</a></li>
+<li class="toctree-l2 current"><a class="current reference internal" href="">Tablespaces</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data_formats.html">Data Formats</a></li>
+<li class="toctree-l2"><a class="reference internal" href="compression.html">Compression</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../table_partitioning.html">Table Partitioning</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/intro_to_partitioning.html">Introduction to Partitioning</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/column_partitioning.html">Column Partitioning</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/range_partitioning.html">Range Partitioning</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../partitioning/hash_partitioning.html">Hash Partitioning</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../storage_plugins.html">Storage Plugin</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../storage_plugins/overview.html">Storage Plugin Overview</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../storage_plugins/postgresql.html">PostgreSQL Storage Handler</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../index_overview.html">Index (Experimental Feature)</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../index/types.html">Index Types</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../index/how_to_use.html">How to use index?</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../index/future_work.html">Future Works</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../backup_and_restore.html">Backup and Restore</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../backup_and_restore/catalog.html">Backup and Restore Catalog</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../hive_integration.html">Hive Integration</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../hbase_integration.html">HBase Integration</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#create-table">CREATE TABLE</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#drop-table">DROP TABLE</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#insert-overwrite-into">INSERT (OVERWRITE) INTO</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../hbase_integration.html#usage">Usage</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../swift_integration.html">OpenStack Swift Integration</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#swift-configuration">Swift configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#hadoop-configurations">Hadoop configurations</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#tajo-configuration">Tajo configuration</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../swift_integration.html#querying-on-swift">Querying on Swift</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../jdbc_driver.html">Tajo JDBC Driver</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#how-to-get-jdbc-driver">How to get JDBC driver</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#setting-the-classpath">Setting the CLASSPATH</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#connecting-to-the-tajo-cluster-instance">Connecting to the Tajo cluster instance</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#connection-parameters">Connection Parameters</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#an-example-jdbc-client">An Example JDBC Client</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../tajo_client_api.html">Tajo Client API</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
+</ul>
+
+
+ </div>
+
+ </nav>
+
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+
+ <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+ <a href="../index.html">Apache Tajo</a>
+ </nav>
+
+
+
+ <div class="wy-nav-content">
+ <div class="rst-content">
+ <div role="navigation" aria-label="breadcrumbs navigation">
+ <ul class="wy-breadcrumbs">
+ <li><a href="../index.html">Docs</a> »</li>
+
+ <li><a href="../table_management.html">Table Management</a> »</li>
+
+ <li>Tablespaces</li>
+ <li class="wy-breadcrumbs-aside">
+
+ <a href="../_sources/table_management/tablespaces.txt" rel="nofollow"> View page source</a>
+
+ </li>
+ </ul>
+ <hr/>
+</div>
+ <div role="main">
+
+ <div class="section" id="tablespaces">
+<h1>Tablespaces<a class="headerlink" href="#tablespaces" title="Permalink to this headline">¶</a></h1>
+<p>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.</p>
+<div class="section" id="external-table-managed-table-and-tablespace">
+<h2>External Table, Managed Table and Tablespace<a class="headerlink" href="#external-table-managed-table-and-tablespace" title="Permalink to this headline">¶</a></h2>
+<p>Tajo has two types of table. One is external table. It needs <strong>location</strong> 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 a speficied tablespace.</p>
+<p>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 <strong>tablespace</strong> 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.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">For creating a table, see <a class="reference internal" href="../sql_language/ddl.html"><em>Data Definition Language</em></a>.</p>
+</div>
+</div>
+<div class="section" id="configuration">
+<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
+<p>By default, Tajo use <tt class="docutils literal"><span class="pre">${tajo.rootdir}/warehouse</span></tt> in <a class="reference internal" href="../configuration/tajo-site-xml.html"><em>conf/tajo-site.xml</em></a> as a default tablespace. It also allows users to register additional tablespaces using <tt class="docutils literal"><span class="pre">storage-site.json</span></tt> file like below.</p>
+<div class="section" id="conf-storage-site-json-file">
+<h3>conf/storage-site.json file<a class="headerlink" href="#conf-storage-site-json-file" title="Permalink to this headline">¶</a></h3>
+<p>The configuration file has the following struct:</p>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span>
+ <span class="nt">"spaces"</span><span class="p">:</span> <span class="p">{</span>
+ <span class="nt">"${tablespace_name}"</span><span class="p">:</span> <span class="p">{</span>
+ <span class="nt">"uri"</span><span class="p">:</span> <span class="s2">"hbase:zk://quorum1:port,quorum2:port/"</span>
+ <span class="p">}</span>
+ <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>The following is an example for two tablespaces for hbase and hdfs:</p>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span>
+ <span class="nt">"spaces"</span><span class="p">:</span> <span class="p">{</span>
+ <span class="nt">"hbase_cluster1"</span><span class="p">:</span> <span class="p">{</span>
+ <span class="nt">"uri"</span><span class="p">:</span> <span class="s2">"hbase:zk://quorum1:port,quorum2:port/"</span>
+ <span class="p">},</span>
+
+ <span class="nt">"ssd"</span><span class="p">:</span> <span class="p">{</span>
+ <span class="nt">"uri"</span><span class="p">:</span> <span class="s2">"hdfs://host:port/data/ssd"</span>
+ <span class="p">}</span>
+ <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>For more details, see <a class="reference internal" href="../configuration/storage-site-json.html"><em>conf/storage-site.json</em></a>.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">Also, each tablespace can use different storage type. Please see <a class="reference internal" href="../storage_plugins.html"><em>Storage Plugin</em></a> if you want to know more information about it.</p>
+</div>
+</div>
+</div>
+</div>
+
+
+ </div>
+ <footer>
+
+ <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+
+ <a href="data_formats.html" class="btn btn-neutral float-right" title="Data Formats"/>Next <span class="fa fa-arrow-circle-right"></span></a>
+
+
+ <a href="table_overview.html" class="btn btn-neutral" title="Overview of Tajo Tables"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+
+ </div>
+
+
+ <hr/>
+
+ <div role="contentinfo">
+ <p>
+ © Copyright 2016, Apache Tajo Team.
+ </p>
+ </div>
+
+ <a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>
+</footer>
+ </div>
+ </div>
+
+ </section>
+
+ </div>
+
+
+
+
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT:'../',
+ VERSION:'0.11.3',
+ COLLAPSE_INDEX:false,
+ FILE_SUFFIX:'.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+
+
+
+
+
+ <script type="text/javascript" src="../_static/js/theme.js"></script>
+
+
+
+
+ <script type="text/javascript">
+ jQuery(function () {
+ SphinxRtdTheme.StickyNav.enable();
+ });
+ </script>
+
+
+</body>
+</html>
\ No newline at end of file