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

svn commit: r1649478 [1/7] - in /tajo/site/docs/devel: ./ _sources/ _sources/configuration/ _sources/table_management/ _sources/tsql/ _static/ backup_and_restore/ configuration/ functions/ partitioning/ sql_language/ table_management/ tsql/

Author: hyunsik
Date: Mon Jan  5 08:43:18 2015
New Revision: 1649478

URL: http://svn.apache.org/r1649478
Log:
Update by TAJO-1274.

Added:
    tajo/site/docs/devel/_static/jquery-1.11.1.js
    tajo/site/docs/devel/_static/underscore-1.3.1.js
Modified:
    tajo/site/docs/devel/_sources/configuration/catalog_configuration.txt
    tajo/site/docs/devel/_sources/getting_started.txt
    tajo/site/docs/devel/_sources/table_management/csv.txt
    tajo/site/docs/devel/_sources/table_management/table_overview.txt
    tajo/site/docs/devel/_sources/time_zone.txt
    tajo/site/docs/devel/_sources/tsql/meta_command.txt
    tajo/site/docs/devel/_static/basic.css
    tajo/site/docs/devel/_static/doctools.js
    tajo/site/docs/devel/_static/down-pressed.png
    tajo/site/docs/devel/_static/down.png
    tajo/site/docs/devel/_static/file.png
    tajo/site/docs/devel/_static/jquery.js
    tajo/site/docs/devel/_static/minus.png
    tajo/site/docs/devel/_static/plus.png
    tajo/site/docs/devel/_static/pygments.css
    tajo/site/docs/devel/_static/searchtools.js
    tajo/site/docs/devel/_static/up-pressed.png
    tajo/site/docs/devel/_static/up.png
    tajo/site/docs/devel/_static/websupport.js
    tajo/site/docs/devel/backup_and_restore.html
    tajo/site/docs/devel/backup_and_restore/catalog.html
    tajo/site/docs/devel/configuration.html
    tajo/site/docs/devel/configuration/catalog-site-xml.html
    tajo/site/docs/devel/configuration/catalog_configuration.html
    tajo/site/docs/devel/configuration/cluster_setup.html
    tajo/site/docs/devel/configuration/ha_configuration.html
    tajo/site/docs/devel/configuration/preliminary.html
    tajo/site/docs/devel/configuration/service_config_defaults.html
    tajo/site/docs/devel/configuration/tajo-site-xml.html
    tajo/site/docs/devel/configuration/tajo_master_configuration.html
    tajo/site/docs/devel/configuration/worker_configuration.html
    tajo/site/docs/devel/faq.html
    tajo/site/docs/devel/functions.html
    tajo/site/docs/devel/functions/datetime_func_and_operators.html
    tajo/site/docs/devel/functions/math_func_and_operators.html
    tajo/site/docs/devel/functions/network_func_and_operators.html
    tajo/site/docs/devel/functions/string_func_and_operators.html
    tajo/site/docs/devel/genindex.html
    tajo/site/docs/devel/getting_started.html
    tajo/site/docs/devel/hcatalog_integration.html
    tajo/site/docs/devel/index.html
    tajo/site/docs/devel/introduction.html
    tajo/site/docs/devel/jdbc_driver.html
    tajo/site/docs/devel/objects.inv
    tajo/site/docs/devel/partitioning/column_partitioning.html
    tajo/site/docs/devel/partitioning/hash_partitioning.html
    tajo/site/docs/devel/partitioning/intro_to_partitioning.html
    tajo/site/docs/devel/partitioning/range_partitioning.html
    tajo/site/docs/devel/search.html
    tajo/site/docs/devel/searchindex.js
    tajo/site/docs/devel/sql_language.html
    tajo/site/docs/devel/sql_language/data_model.html
    tajo/site/docs/devel/sql_language/ddl.html
    tajo/site/docs/devel/sql_language/insert.html
    tajo/site/docs/devel/sql_language/predicates.html
    tajo/site/docs/devel/sql_language/queries.html
    tajo/site/docs/devel/sql_language/sql_expression.html
    tajo/site/docs/devel/table_management.html
    tajo/site/docs/devel/table_management/compression.html
    tajo/site/docs/devel/table_management/csv.html
    tajo/site/docs/devel/table_management/file_formats.html
    tajo/site/docs/devel/table_management/parquet.html
    tajo/site/docs/devel/table_management/rcfile.html
    tajo/site/docs/devel/table_management/sequencefile.html
    tajo/site/docs/devel/table_management/table_overview.html
    tajo/site/docs/devel/table_partitioning.html
    tajo/site/docs/devel/tajo_client_api.html
    tajo/site/docs/devel/time_zone.html
    tajo/site/docs/devel/tsql.html
    tajo/site/docs/devel/tsql/admin_command.html
    tajo/site/docs/devel/tsql/background_command.html
    tajo/site/docs/devel/tsql/dfs_command.html
    tajo/site/docs/devel/tsql/execute_file.html
    tajo/site/docs/devel/tsql/intro.html
    tajo/site/docs/devel/tsql/meta_command.html
    tajo/site/docs/devel/tsql/single_command.html
    tajo/site/docs/devel/tsql/variables.html

Modified: tajo/site/docs/devel/_sources/configuration/catalog_configuration.txt
URL: http://svn.apache.org/viewvc/tajo/site/docs/devel/_sources/configuration/catalog_configuration.txt?rev=1649478&r1=1649477&r2=1649478&view=diff
==============================================================================
--- tajo/site/docs/devel/_sources/configuration/catalog_configuration.txt (original)
+++ tajo/site/docs/devel/_sources/configuration/catalog_configuration.txt Mon Jan  5 08:43:18 2015
@@ -126,9 +126,9 @@ All configurations for using MariaDBStor
   </property>
 
 
-----------------------------------
+==================================
   HCatalogStore Configuration
-----------------------------------
+==================================
 
 Tajo support HCatalogStore to integrate with hive. If you want to use HCatalogStore, you just do as follows.
 

Modified: tajo/site/docs/devel/_sources/getting_started.txt
URL: http://svn.apache.org/viewvc/tajo/site/docs/devel/_sources/getting_started.txt?rev=1649478&r1=1649477&r2=1649478&view=diff
==============================================================================
--- tajo/site/docs/devel/_sources/getting_started.txt (original)
+++ tajo/site/docs/devel/_sources/getting_started.txt Mon Jan  5 08:43:18 2015
@@ -4,11 +4,179 @@ Getting Started
 
 In this section, we explain setup of a standalone Tajo instance. It will run against the local filesystem. In later sections, we will present how to run Tajo cluster instance on Apache Hadoop's HDFS, a distributed filesystem. This section shows you how to start up a Tajo cluster, create tables in your Tajo cluster, submit SQL queries via Tajo shell, and shutting down your Tajo cluster instance. The below exercise should take no more than ten minutes.
 
-.. toctree::
-  :maxdepth: 1
+======================
+Prerequisites
+======================
 
-  getting_started/prerequisites
-  getting_started/downloading_source
-  getting_started/building
-  getting_started/local_setup
-  getting_started/first_query
\ No newline at end of file
+ * Hadoop 2.3.0 or higher (up to 2.5.1)
+ * Java 1.6 or 1.7
+ * Protocol buffer 2.5.0
+
+===================================
+Dowload and unpack the source code
+===================================
+
+You can either download the source code release of Tajo or check out the development codebase from Git.
+
+-----------------------------------
+Download the latest source release
+-----------------------------------
+
+Choose a download site from this list of `Apache Download Mirrors <http://www.apache.org/dyn/closer.cgi/tajo>`_.
+Click on the suggested mirror link. This will take you to a mirror of Tajo Releases. 
+Download the file that ends in .tar.gz to your local filesystem, e.g. tajo-x.y.z-src.tar.gz.
+
+Decompress and untar your downloaded file and then change into the unpacked directory. ::
+
+  tar xzvf tajo-x.y.z-src.tar.gz
+
+-----------------------------------
+Check out the source code via Git
+-----------------------------------
+
+The development codebase can also be downloaded from `the Apache git repository <https://git-wip-us.apache.org/repos/asf/tajo.git>`_ as follows: ::
+
+  git clone https://git-wip-us.apache.org/repos/asf/tajo.git
+
+A read-only git repository is also mirrored on `Github <https://github.com/apache/tajo>`_.
+
+
+=================
+Build source code
+=================
+
+You prepare the prerequisites and the source code, you can build the source code now.
+
+The first step of the installation procedure is to configure the source tree for your system and choose the options you would like. This is done by running the configure script. For a default installation simply enter:
+
+You can compile source code and get a binary archive as follows:
+
+.. code-block:: bash
+
+  $ cd tajo-x.y.z
+  $ mvn clean install -DskipTests -Pdist -Dtar -Dhadoop.version=2.X.X
+  $ ls tajo-dist/target/tajo-x.y.z-SNAPSHOT.tar.gz
+
+.. note::
+
+  If you don't specify the hadoop version, tajo cluster may not run correctly. Thus, we highly recommend that you specify your hadoop version with maven build command.
+
+  Example:
+
+    $ mvn clean install -DskipTests -Pdist -Dtar -Dhadoop.version=2.5.1
+
+Then, after you move some proper directory, discompress the tar.gz file as follows:
+
+.. code-block:: bash
+
+  $ cd [a directory to be parent of tajo binary]
+  $ tar xzvf ${TAJO_SRC}/tajo-dist/target/tajo-x.y.z-SNAPSHOT.tar.gz
+
+================================
+Setting up a local Tajo cluster
+================================
+
+Apache Tajo™ provides two run modes: local mode and fully distributed mode. Here, we explain only the local mode where a Tajo instance runs on a local file system. A local mode Tajo instance can start up with very simple configurations.
+
+First of all, you need to add the environment variables to conf/tajo-env.sh.
+
+.. code-block:: bash
+
+  # Hadoop home. Required
+  export HADOOP_HOME= ...
+
+  # The java implementation to use.  Required.
+  export JAVA_HOME= ...
+
+To launch the tajo master, execute start-tajo.sh.
+
+.. code-block:: bash
+
+  $ $TAJO_HOME/bin/start-tajo.sh
+
+.. note::
+
+  If you want to how to setup a fully distributed mode of Tajo, please see :doc:`/configuration/cluster_setup`.
+
+.. warning::
+
+  By default, *Catalog server* which manages table meta data uses `Apache Derby <http://db.apache.org/derby/>`_ as a persistent storage, and Derby stores 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. To learn Catalog configuration, please refer to :doc:`/configuration/catalog_configuration`.
+
+======================
+First query execution
+======================
+
+First of all, we need to prepare some table for query execution. For example, you can make a simple text-based table as follows: 
+
+.. code-block:: bash
+
+  $ mkdir /home/x/table1
+  $ cd /home/x/table1
+  $ cat > data.csv
+  1|abc|1.1|a
+  2|def|2.3|b
+  3|ghi|3.4|c
+  4|jkl|4.5|d
+  5|mno|5.6|e
+  <CTRL + D>
+
+
+Apache Tajo™ provides a SQL shell which allows users to interactively submit SQL queries. In order to use this shell, please execute ``bin/tsql`` ::
+
+  $ $TAJO_HOME/bin/tsql
+  tajo>
+
+In order to load the table we created above, we should think of a schema of the table.
+Here, we assume the schema as (int, text, float, text). ::
+
+  $ $TAJO_HOME/bin/tsql
+  tajo> create external table table1 (
+        id int,
+        name text, 
+        score float, 
+        type text) 
+        using csv with ('text.delimiter'='|') location 'file:/home/x/table1';
+
+To load an external table, you need to use ‘create external table’ statement. 
+In the location clause, you should use the absolute directory path with an appropriate scheme. 
+If the table resides in HDFS, you should use ‘hdfs’ instead of ‘file’.
+
+If you want to know DDL statements in more detail, please see Query Language. ::
+
+  tajo> \d
+  table1
+
+ ``\d`` command shows the list of tables. ::
+
+  tajo> \d table1
+
+  table name: table1
+  table path: file:/home/x/table1
+  store type: CSV
+  number of rows: 0
+  volume (bytes): 78 B
+  schema:
+  id      INT
+  name    TEXT
+  score   FLOAT
+  type    TEXT
+
+``\d [table name]`` command shows the description of a given table.
+
+Also, you can execute SQL queries as follows: ::
+
+  tajo> select * from table1 where id > 2;
+  final state: QUERY_SUCCEEDED, init time: 0.069 sec, response time: 0.397 sec
+  result: file:/tmp/tajo-hadoop/staging/q_1363768615503_0001_000001/RESULT, 3 rows ( 35B)
+
+  id,  name,  score,  type
+  - - - - - - - - - -  - - -
+  3,  ghi,  3.4,  c
+  4,  jkl,  4.5,  d
+  5,  mno,  5.6,  e
+
+  tajo> \q
+  bye
+
+Feel free to enjoy Tajo with SQL standards. 
+If you want to know more explanation for SQL supported by Tajo, please refer :doc:`/sql_language`.
\ No newline at end of file

Modified: tajo/site/docs/devel/_sources/table_management/csv.txt
URL: http://svn.apache.org/viewvc/tajo/site/docs/devel/_sources/table_management/csv.txt?rev=1649478&r1=1649477&r2=1649478&view=diff
==============================================================================
--- tajo/site/docs/devel/_sources/table_management/csv.txt (original)
+++ tajo/site/docs/devel/_sources/table_management/csv.txt Mon Jan  5 08:43:18 2015
@@ -110,6 +110,6 @@ clause in a Hive's ``CREATE TABLE`` stat
 
  CREATE TABLE table1 (id int, name string, score float, type string)
  ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
- STORED AS TEXTFILE
+ STORED AS TEXT
 
-To the best of our knowledge, there is not way to specify a custom NULL character in Hive.
\ No newline at end of file
+To the best of our knowledge, there is not way to specify a custom NULL character in Hive.

Modified: tajo/site/docs/devel/_sources/table_management/table_overview.txt
URL: http://svn.apache.org/viewvc/tajo/site/docs/devel/_sources/table_management/table_overview.txt?rev=1649478&r1=1649477&r2=1649478&view=diff
==============================================================================
--- tajo/site/docs/devel/_sources/table_management/table_overview.txt (original)
+++ tajo/site/docs/devel/_sources/table_management/table_overview.txt Mon Jan  5 08:43:18 2015
@@ -57,7 +57,7 @@ You can specify a table time zone as fol
    CREATE EXTERNAL TABLE table1 (
     t_timestamp  TIMESTAMP,
     t_date    DATE
-   ) USING TEXTFILE WITH('timezone'='ASIA/Seoul') LOCATION '/path-to-table/'
+   ) USING TEXT WITH('timezone'='ASIA/Seoul') LOCATION '/path-to-table/'
  
 
-In order to learn time zone, please refer to :doc:`/time_zone`.
\ No newline at end of file
+In order to learn time zone, please refer to :doc:`/time_zone`.

Modified: tajo/site/docs/devel/_sources/time_zone.txt
URL: http://svn.apache.org/viewvc/tajo/site/docs/devel/_sources/time_zone.txt?rev=1649478&r1=1649477&r2=1649478&view=diff
==============================================================================
--- tajo/site/docs/devel/_sources/time_zone.txt (original)
+++ tajo/site/docs/devel/_sources/time_zone.txt Mon Jan  5 08:43:18 2015
@@ -36,7 +36,7 @@ You can specify a table time zone as fol
    CREATE EXTERNAL TABLE table1 (
     t_timestamp  TIMESTAMP,
     t_date    DATE
-   ) USING TEXTFILE WITH('timezone'='ASIA/Seoul') LOCATION '/path-to-table/'
+   ) USING TEXT WITH('timezone'='ASIA/Seoul') LOCATION '/path-to-table/'
  
 
 In order to learn table properties, please refer to :doc:`/table_management/table_overview`.
@@ -102,7 +102,7 @@ In order to register the table, we shoul
  CREATE EXTERNAL TABLE table1 (
   t_timestamp  TIMESTAMP,
   t_date    DATE
- ) USING TEXTFILE WITH('text.delimiter'='|', 'timezone'='ASIA/Seoul') LOCATION '/path-to-table/'
+ ) USING TEXT WITH('text.delimiter'='|', 'timezone'='ASIA/Seoul') LOCATION '/path-to-table/'
 
 
 By default, ``tsql`` and ``TajoClient`` API use UTC time zone. So, timestamp values in the result are adjusted by the time zone offset. But, date is not adjusted because date type does not consider time zone.
@@ -126,4 +126,4 @@ In addition, users can set client-side t
   ----------------------------------
   1980-04-01 01:50:30.01, 1980-04-01
   1980-04-01 01:50:30   , 1980-04-01
-  1980-04-01 01:50:30   , 1980-04-01
\ No newline at end of file
+  1980-04-01 01:50:30   , 1980-04-01

Modified: tajo/site/docs/devel/_sources/tsql/meta_command.txt
URL: http://svn.apache.org/viewvc/tajo/site/docs/devel/_sources/tsql/meta_command.txt?rev=1649478&r1=1649477&r2=1649478&view=diff
==============================================================================
--- tajo/site/docs/devel/_sources/tsql/meta_command.txt (original)
+++ tajo/site/docs/devel/_sources/tsql/meta_command.txt Mon Jan  5 08:43:18 2015
@@ -41,7 +41,7 @@ In the current implementation, there are
 
 
   Documentations
-    tsql guide        http://tajo.apache.org/docs/current/cli.html
+    tsql guide        http://tajo.apache.org/docs/current/tsql.html
     Query language    http://tajo.apache.org/docs/current/sql_language.html
     Functions         http://tajo.apache.org/docs/current/functions.html
     Backup & restore  http://tajo.apache.org/docs/current/backup_and_restore.html

Modified: tajo/site/docs/devel/_static/basic.css
URL: http://svn.apache.org/viewvc/tajo/site/docs/devel/_static/basic.css?rev=1649478&r1=1649477&r2=1649478&view=diff
==============================================================================
--- tajo/site/docs/devel/_static/basic.css (original)
+++ tajo/site/docs/devel/_static/basic.css Mon Jan  5 08:43:18 2015
@@ -4,7 +4,7 @@
  *
  * Sphinx stylesheet -- basic theme.
  *
- * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
  * :license: BSD, see LICENSE for details.
  *
  */
@@ -197,7 +197,10 @@ h3:hover > a.headerlink,
 h4:hover > a.headerlink,
 h5:hover > a.headerlink,
 h6:hover > a.headerlink,
-dt:hover > a.headerlink {
+dt:hover > a.headerlink,
+caption:hover > a.headerlink,
+p.caption:hover > a.headerlink,
+div.code-block-caption:hover > a.headerlink {
     visibility: visible;
 }
 
@@ -314,6 +317,13 @@ table.docutils {
     border-collapse: collapse;
 }
 
+table caption span.caption-number {
+    font-style: italic;
+}
+
+table caption span.caption-text {
+}
+
 table.docutils td, table.docutils th {
     padding: 1px 8px 1px 5px;
     border-top: 0;
@@ -344,6 +354,25 @@ table.citation td {
     border-bottom: none;
 }
 
+/* -- figures --------------------------------------------------------------- */
+
+div.figure {
+    margin: 0.5em;
+    padding: 0.5em;
+}
+
+div.figure p.caption {
+    padding: 0.3em;
+}
+
+div.figure p.caption span.caption-number {
+    font-style: italic;
+}
+
+div.figure p.caption span.caption-text {
+}
+
+
 /* -- other body styles ----------------------------------------------------- */
 
 ol.arabic {
@@ -406,6 +435,10 @@ dl.glossary dt {
     font-size: 1.3em;
 }
 
+.sig-paren {
+    font-size: larger;
+}
+
 .versionmodified {
     font-style: italic;
 }
@@ -471,22 +504,51 @@ table.highlighttable td {
     padding: 0 0.5em 0 0.5em;
 }
 
-tt.descname {
+div.code-block-caption {
+    padding: 2px 5px;
+    font-size: small;
+}
+
+div.code-block-caption code {
+    background-color: transparent;
+}
+
+div.code-block-caption + div > div.highlight > pre {
+    margin-top: 0;
+}
+
+div.code-block-caption span.caption-number {
+    padding: 0.1em 0.3em;
+    font-style: italic;
+}
+
+div.code-block-caption span.caption-text {
+}
+
+div.container {
+    padding: 1em 1em 0;
+}
+
+div.container div.highlight {
+    margin: 0;
+}
+
+code.descname {
     background-color: transparent;
     font-weight: bold;
     font-size: 1.2em;
 }
 
-tt.descclassname {
+code.descclassname {
     background-color: transparent;
 }
 
-tt.xref, a tt {
+code.xref, a code {
     background-color: transparent;
     font-weight: bold;
 }
 
-h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
     background-color: transparent;
 }
 

Modified: tajo/site/docs/devel/_static/doctools.js
URL: http://svn.apache.org/viewvc/tajo/site/docs/devel/_static/doctools.js?rev=1649478&r1=1649477&r2=1649478&view=diff
==============================================================================
--- tajo/site/docs/devel/_static/doctools.js (original)
+++ tajo/site/docs/devel/_static/doctools.js Mon Jan  5 08:43:18 2015
@@ -4,7 +4,7 @@
  *
  * Sphinx JavaScript utilities for all documentation.
  *
- * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
  * :license: BSD, see LICENSE for details.
  *
  */
@@ -91,6 +91,30 @@ jQuery.fn.highlightText = function(text,
   });
 };
 
+/*
+ * backward compatibility for jQuery.browser
+ * This will be supported until firefox bug is fixed.
+ */
+if (!jQuery.browser) {
+  jQuery.uaMatch = function(ua) {
+    ua = ua.toLowerCase();
+
+    var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
+      /(webkit)[ \/]([\w.]+)/.exec(ua) ||
+      /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
+      /(msie) ([\w.]+)/.exec(ua) ||
+      ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
+      [];
+
+    return {
+      browser: match[ 1 ] || "",
+      version: match[ 2 ] || "0"
+    };
+  };
+  jQuery.browser = {};
+  jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
+}
+
 /**
  * Small JavaScript module for the documentation.
  */
@@ -152,6 +176,7 @@ var Documentation = {
 
   /**
    * workaround a firefox stupidity
+   * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
    */
   fixFirefoxAnchorBug : function() {
     if (document.location.hash && $.browser.mozilla)

Modified: tajo/site/docs/devel/_static/down-pressed.png
URL: http://svn.apache.org/viewvc/tajo/site/docs/devel/_static/down-pressed.png?rev=1649478&r1=1649477&r2=1649478&view=diff
==============================================================================
Binary files - no diff available.

Modified: tajo/site/docs/devel/_static/down.png
URL: http://svn.apache.org/viewvc/tajo/site/docs/devel/_static/down.png?rev=1649478&r1=1649477&r2=1649478&view=diff
==============================================================================
Binary files - no diff available.

Modified: tajo/site/docs/devel/_static/file.png
URL: http://svn.apache.org/viewvc/tajo/site/docs/devel/_static/file.png?rev=1649478&r1=1649477&r2=1649478&view=diff
==============================================================================
Binary files - no diff available.