Added: tajo/site/docs/current/tsql/dfs_command.html URL: http://svn.apache.org/viewvc/tajo/site/docs/current/tsql/dfs_command.html?rev=1644658&view=auto ============================================================================== --- tajo/site/docs/current/tsql/dfs_command.html (added) +++ tajo/site/docs/current/tsql/dfs_command.html Thu Dec 11 14:43:31 2014 @@ -0,0 +1,260 @@ + + +<!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>Executing HDFS commands — Apache Tajo 0.8.0 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.8.0 documentation" href="../index.html"/> + <link rel="up" title="Tajo Shell (TSQL)" href="../tsql.html"/> + <link rel="next" title="Session Variables" href="variables.html"/> + <link rel="prev" title="Meta Commands" href="meta_command.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/prerequisites.html">Prerequisites</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/downloading_source.html">Dowload and unpack the source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/building.html">Build source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/local_setup.html">Setting up a local Tajo cluster</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/first_query.html">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/configuration_defaults.html">Configuration Defaults</a></li> +<li class="toctree-l2"><a class="reference internal" href="../configuration/ha_configuration.html">High Availability for TajoMaster</a></li> +</ul> +</li> +<li class="toctree-l1 current"><a class="reference internal" href="../tsql.html">Tajo Shell (TSQL)</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="meta_command.html">Meta Commands</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="">Executing HDFS commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="variables.html">Session Variables</a></li> +<li class="toctree-l2"><a class="reference internal" href="admin_command.html">Administration Commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="intro.html">Introducing to TSQL</a></li> +<li class="toctree-l2"><a class="reference internal" href="single_command.html">Executing a single command</a></li> +<li class="toctree-l2"><a class="reference internal" href="execute_file.html">Executing Queries from Files</a></li> +<li class="toctree-l2"><a class="reference internal" href="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/queries.html">Queries</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> +</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/math_func_and_operators.html">Math Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/string_func_and_operators.html">String Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/datetime_func_and_operators.html">DateTime Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/network_func_and_operators.html">Network Functions and Operators</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../table_management.html">Table Management</a><ul> +<li class="toctree-l2"><a class="reference internal" href="../table_management/file_formats.html">File Formats</a></li> +<li class="toctree-l2"><a class="reference internal" href="../table_management/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="../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="../hcatalog_integration.html">HCatalog Integration</a></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#an-example-jdbc-client">An Example JDBC Client</a></li> +<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#faq">FAQ</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="../tsql.html">Tajo Shell (TSQL)</a> »</li> + + <li>Executing HDFS commands</li> + <li class="wy-breadcrumbs-aside"> + + <a href="../_sources/tsql/dfs_command.txt" rel="nofollow"> View page source</a> + + </li> + </ul> + <hr/> +</div> + <div role="main"> + + <div class="section" id="executing-hdfs-commands"> +<h1>Executing HDFS commands<a class="headerlink" href="#executing-hdfs-commands" title="Permalink to this headline">¶</a></h1> +<p>You can run the hadoop dfs command (FsShell) within tsql. <tt class="docutils literal"><span class="pre">\dfs</span></tt> command provides a shortcut to the hadoop dfs commands. If you want to use this command, just specify FsShell arguments and add the semicolon at the end as follows:</p> +<div class="highlight-sql"><div class="highlight"><pre>default> \dfs -ls / +Found 3 items +drwxr-xr-x - tajo supergroup 0 2014-08-14 04:04 /tajo +drwxr-xr-x - tajo supergroup 0 2014-09-04 02:20 /tmp +drwxr-xr-x - tajo supergroup 0 2014-09-16 13:41 /user + +default> \dfs -ls /tajo +Found 2 items +drwxr-xr-x - tajo supergroup 0 2014-08-14 04:04 /tajo/system +drwxr-xr-x - tajo supergroup 0 2014-08-14 04:15 /tajo/warehouse + +default> \dfs -mkdir /tajo/temp + +default> \dfs -ls /tajo +Found 3 items +drwxr-xr-x - tajo supergroup 0 2014-08-14 04:04 /tajo/system +drwxr-xr-x - tajo supergroup 0 2014-09-23 06:48 /tajo/temp +drwxr-xr-x - tajo supergroup 0 2014-08-14 04:15 /tajo/warehouse +</pre></div> +</div> +</div> + + + </div> + <footer> + + <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> + + <a href="variables.html" class="btn btn-neutral float-right" title="Session Variables"/>Next <span class="fa fa-arrow-circle-right"></span></a> + + + <a href="meta_command.html" class="btn btn-neutral" title="Meta Commands"><span class="fa fa-arrow-circle-left"></span> Previous</a> + + </div> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2014, 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.8.0', + 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/current/tsql/execute_file.html URL: http://svn.apache.org/viewvc/tajo/site/docs/current/tsql/execute_file.html?rev=1644658&view=auto ============================================================================== --- tajo/site/docs/current/tsql/execute_file.html (added) +++ tajo/site/docs/current/tsql/execute_file.html Thu Dec 11 14:43:31 2014 @@ -0,0 +1,286 @@ + + +<!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>Executing Queries from Files — Apache Tajo 0.8.0 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.8.0 documentation" href="../index.html"/> + <link rel="up" title="Tajo Shell (TSQL)" href="../tsql.html"/> + <link rel="next" title="Executing as background process" href="background_command.html"/> + <link rel="prev" title="Executing a single command" href="single_command.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/prerequisites.html">Prerequisites</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/downloading_source.html">Dowload and unpack the source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/building.html">Build source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/local_setup.html">Setting up a local Tajo cluster</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/first_query.html">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/configuration_defaults.html">Configuration Defaults</a></li> +<li class="toctree-l2"><a class="reference internal" href="../configuration/ha_configuration.html">High Availability for TajoMaster</a></li> +</ul> +</li> +<li class="toctree-l1 current"><a class="reference internal" href="../tsql.html">Tajo Shell (TSQL)</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="meta_command.html">Meta Commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="dfs_command.html">Executing HDFS commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="variables.html">Session Variables</a></li> +<li class="toctree-l2"><a class="reference internal" href="admin_command.html">Administration Commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="intro.html">Introducing to TSQL</a></li> +<li class="toctree-l2"><a class="reference internal" href="single_command.html">Executing a single command</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="">Executing Queries from Files</a></li> +<li class="toctree-l2"><a class="reference internal" href="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/queries.html">Queries</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> +</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/math_func_and_operators.html">Math Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/string_func_and_operators.html">String Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/datetime_func_and_operators.html">DateTime Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/network_func_and_operators.html">Network Functions and Operators</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../table_management.html">Table Management</a><ul> +<li class="toctree-l2"><a class="reference internal" href="../table_management/file_formats.html">File Formats</a></li> +<li class="toctree-l2"><a class="reference internal" href="../table_management/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="../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="../hcatalog_integration.html">HCatalog Integration</a></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#an-example-jdbc-client">An Example JDBC Client</a></li> +<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#faq">FAQ</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="../tsql.html">Tajo Shell (TSQL)</a> »</li> + + <li>Executing Queries from Files</li> + <li class="wy-breadcrumbs-aside"> + + <a href="../_sources/tsql/execute_file.txt" rel="nofollow"> View page source</a> + + </li> + </ul> + <hr/> +</div> + <div role="main"> + + <div class="section" id="executing-queries-from-files"> +<h1>Executing Queries from Files<a class="headerlink" href="#executing-queries-from-files" title="Permalink to this headline">¶</a></h1> +<div class="section" id="basic-usages"> +<h2>Basic usages<a class="headerlink" href="#basic-usages" title="Permalink to this headline">¶</a></h2> +<p><tt class="docutils literal"><span class="pre">-f</span></tt> command allows tsql to execute more than one SQL statements stored in a text file as follows:</p> +<div class="highlight-sql"><div class="highlight"><pre>$ cat aggregation.sql +select count(*) from table1; +select sum(score) from table1; + +$ bin/tsql -f aggregation.sql +Progress: 0%, response time: 0.216 sec +Progress: 0%, response time: 0.217 sec +Progress: 100%, response time: 0.331 sec +?count +------------------------------- +5 +(1 rows, 0.331 sec, 2 B selected) +Progress: 0%, response time: 0.203 sec +Progress: 0%, response time: 0.204 sec +Progress: 50%, response time: 0.406 sec +Progress: 100%, response time: 0.769 sec +?sum +------------------------------- +15.0 +(1 rows, 0.769 sec, 5 B selected) +</pre></div> +</div> +</div> +<div class="section" id="setting-parameter-value-in-sql-file"> +<h2>Setting parameter value in SQL file<a class="headerlink" href="#setting-parameter-value-in-sql-file" title="Permalink to this headline">¶</a></h2> +<p>If you wish to set a parameter value in the SQL file, you can set with the -param key=value option. When you use this feature, you have to use the parameter in the file as follows:</p> +<div class="highlight-sql"><div class="highlight"><pre>${paramter name} +</pre></div> +</div> +<p>You have to put the parameter name in braces and you must use the $ symbol for the prefix as follows:</p> +<div class="highlight-sql"><div class="highlight"><pre>$ cat aggregation.sql +select count(*) from table1 where id = ${p_id}; + +$ bin/tsql -param p_id=1 -f aggregation.sql +Progress: 0%, response time: 0.216 sec +Progress: 0%, response time: 0.217 sec +Progress: 100%, response time: 0.331 sec +?count +------------------------------- +1 +(1 rows, 0.331 sec, 2 B selected) +</pre></div> +</div> +</div> +</div> + + + </div> + <footer> + + <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> + + <a href="background_command.html" class="btn btn-neutral float-right" title="Executing as background process"/>Next <span class="fa fa-arrow-circle-right"></span></a> + + + <a href="single_command.html" class="btn btn-neutral" title="Executing a single command"><span class="fa fa-arrow-circle-left"></span> Previous</a> + + </div> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2014, 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.8.0', + 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/current/tsql/intro.html URL: http://svn.apache.org/viewvc/tajo/site/docs/current/tsql/intro.html?rev=1644658&view=auto ============================================================================== --- tajo/site/docs/current/tsql/intro.html (added) +++ tajo/site/docs/current/tsql/intro.html Thu Dec 11 14:43:31 2014 @@ -0,0 +1,272 @@ + + +<!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>Introducing to TSQL — Apache Tajo 0.8.0 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.8.0 documentation" href="../index.html"/> + <link rel="up" title="Tajo Shell (TSQL)" href="../tsql.html"/> + <link rel="next" title="Executing a single command" href="single_command.html"/> + <link rel="prev" title="Administration Commands" href="admin_command.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/prerequisites.html">Prerequisites</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/downloading_source.html">Dowload and unpack the source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/building.html">Build source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/local_setup.html">Setting up a local Tajo cluster</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/first_query.html">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/configuration_defaults.html">Configuration Defaults</a></li> +<li class="toctree-l2"><a class="reference internal" href="../configuration/ha_configuration.html">High Availability for TajoMaster</a></li> +</ul> +</li> +<li class="toctree-l1 current"><a class="reference internal" href="../tsql.html">Tajo Shell (TSQL)</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="meta_command.html">Meta Commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="dfs_command.html">Executing HDFS commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="variables.html">Session Variables</a></li> +<li class="toctree-l2"><a class="reference internal" href="admin_command.html">Administration Commands</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="">Introducing to TSQL</a></li> +<li class="toctree-l2"><a class="reference internal" href="single_command.html">Executing a single command</a></li> +<li class="toctree-l2"><a class="reference internal" href="execute_file.html">Executing Queries from Files</a></li> +<li class="toctree-l2"><a class="reference internal" href="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/queries.html">Queries</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> +</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/math_func_and_operators.html">Math Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/string_func_and_operators.html">String Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/datetime_func_and_operators.html">DateTime Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/network_func_and_operators.html">Network Functions and Operators</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../table_management.html">Table Management</a><ul> +<li class="toctree-l2"><a class="reference internal" href="../table_management/file_formats.html">File Formats</a></li> +<li class="toctree-l2"><a class="reference internal" href="../table_management/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="../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="../hcatalog_integration.html">HCatalog Integration</a></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#an-example-jdbc-client">An Example JDBC Client</a></li> +<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#faq">FAQ</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="../tsql.html">Tajo Shell (TSQL)</a> »</li> + + <li>Introducing to TSQL</li> + <li class="wy-breadcrumbs-aside"> + + <a href="../_sources/tsql/intro.txt" rel="nofollow"> View page source</a> + + </li> + </ul> + <hr/> +</div> + <div role="main"> + + <div class="section" id="introducing-to-tsql"> +<h1>Introducing to TSQL<a class="headerlink" href="#introducing-to-tsql" title="Permalink to this headline">¶</a></h1> +<div class="section" id="synopsis"> +<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2> +<div class="highlight-bash"><div class="highlight"><pre>bin/tsql <span class="o">[</span>options<span class="o">]</span> <span class="o">[</span>database name<span class="o">]</span> +</pre></div> +</div> +<p>If a <em>database_name</em> is given, tsql connects to the database at startup time. Otherwise, tsql connects to <tt class="docutils literal"><span class="pre">default</span></tt> database.</p> +<p>Options</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">-c</span> <span class="pre">"quoted</span> <span class="pre">sql"</span></tt> : Execute quoted sql statements, and then the shell will exist.</li> +<li><tt class="docutils literal"><span class="pre">-f</span> <span class="pre">filename</span> <span class="pre">(--file</span> <span class="pre">filename)</span></tt> : Use the file named filename as the source of commands instead of interactive shell.</li> +<li><tt class="docutils literal"><span class="pre">-h</span> <span class="pre">hostname</span> <span class="pre">(--host</span> <span class="pre">hostname)</span></tt> : Specifies the host name of the machine on which the Tajo master is running.</li> +<li><tt class="docutils literal"><span class="pre">-p</span> <span class="pre">port</span> <span class="pre">(--port</span> <span class="pre">port)</span></tt> : Specifies the TCP port. If it is not set, the port will be 26002 by default.</li> +<li><tt class="docutils literal"><span class="pre">-conf</span> <span class="pre">configuration</span> <span class="pre">(--conf</span> <span class="pre">configuration)</span></tt> : Setting Tajo configuration value.</li> +<li><tt class="docutils literal"><span class="pre">-param</span> <span class="pre">parameter</span> <span class="pre">(--param</span> <span class="pre">parameter)</span></tt> : Use a parameter value in SQL file.</li> +<li><tt class="docutils literal"><span class="pre">-B</span> <span class="pre">(--background)</span></tt> : Execute as background process.</li> +</ul> +</div> +<div class="section" id="entering-tsql-shell"> +<h2>Entering tsql shell<a class="headerlink" href="#entering-tsql-shell" title="Permalink to this headline">¶</a></h2> +<p>If the hostname and the port num are not given, tsql will try to connect the Tajo master specified in ${TAJO_HOME}/conf/tajo-site.xml.</p> +<div class="highlight-python"><div class="highlight"><pre>bin/tsql + +default> +</pre></div> +</div> +<p>If you want to connect a specified TajoMaster, you should use ‘-h’ and (or) ‘p’ options as follows:</p> +<div class="highlight-python"><div class="highlight"><pre>bin/tsql -h localhost -p 9004 + +default> +</pre></div> +</div> +<p>The prompt indicates the current database.</p> +</div> +</div> + + + </div> + <footer> + + <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> + + <a href="single_command.html" class="btn btn-neutral float-right" title="Executing a single command"/>Next <span class="fa fa-arrow-circle-right"></span></a> + + + <a href="admin_command.html" class="btn btn-neutral" title="Administration Commands"><span class="fa fa-arrow-circle-left"></span> Previous</a> + + </div> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2014, 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.8.0', + 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/current/tsql/meta_command.html URL: http://svn.apache.org/viewvc/tajo/site/docs/current/tsql/meta_command.html?rev=1644658&view=auto ============================================================================== --- tajo/site/docs/current/tsql/meta_command.html (added) +++ tajo/site/docs/current/tsql/meta_command.html Thu Dec 11 14:43:31 2014 @@ -0,0 +1,375 @@ + + +<!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>Meta Commands — Apache Tajo 0.8.0 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.8.0 documentation" href="../index.html"/> + <link rel="up" title="Tajo Shell (TSQL)" href="../tsql.html"/> + <link rel="next" title="Executing HDFS commands" href="dfs_command.html"/> + <link rel="prev" title="Tajo Shell (TSQL)" href="../tsql.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/prerequisites.html">Prerequisites</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/downloading_source.html">Dowload and unpack the source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/building.html">Build source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/local_setup.html">Setting up a local Tajo cluster</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/first_query.html">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/configuration_defaults.html">Configuration Defaults</a></li> +<li class="toctree-l2"><a class="reference internal" href="../configuration/ha_configuration.html">High Availability for TajoMaster</a></li> +</ul> +</li> +<li class="toctree-l1 current"><a class="reference internal" href="../tsql.html">Tajo Shell (TSQL)</a><ul class="current"> +<li class="toctree-l2 current"><a class="current reference internal" href="">Meta Commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="dfs_command.html">Executing HDFS commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="variables.html">Session Variables</a></li> +<li class="toctree-l2"><a class="reference internal" href="admin_command.html">Administration Commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="intro.html">Introducing to TSQL</a></li> +<li class="toctree-l2"><a class="reference internal" href="single_command.html">Executing a single command</a></li> +<li class="toctree-l2"><a class="reference internal" href="execute_file.html">Executing Queries from Files</a></li> +<li class="toctree-l2"><a class="reference internal" href="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/queries.html">Queries</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> +</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/math_func_and_operators.html">Math Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/string_func_and_operators.html">String Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/datetime_func_and_operators.html">DateTime Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/network_func_and_operators.html">Network Functions and Operators</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../table_management.html">Table Management</a><ul> +<li class="toctree-l2"><a class="reference internal" href="../table_management/file_formats.html">File Formats</a></li> +<li class="toctree-l2"><a class="reference internal" href="../table_management/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="../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="../hcatalog_integration.html">HCatalog Integration</a></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#an-example-jdbc-client">An Example JDBC Client</a></li> +<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#faq">FAQ</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="../tsql.html">Tajo Shell (TSQL)</a> »</li> + + <li>Meta Commands</li> + <li class="wy-breadcrumbs-aside"> + + <a href="../_sources/tsql/meta_command.txt" rel="nofollow"> View page source</a> + + </li> + </ul> + <hr/> +</div> + <div role="main"> + + <div class="section" id="meta-commands"> +<h1>Meta Commands<a class="headerlink" href="#meta-commands" title="Permalink to this headline">¶</a></h1> +<p>In tsql, any command that begins with an unquoted backslash (‘’) is a tsql meta-command that is processed by tsql itself.</p> +<p>In the current implementation, there are meta commands as follows:</p> +<div class="highlight-python"><div class="highlight"><pre>default> \? + + +General + \copyright show Apache License 2.0 + \version show Tajo version + \? show help + \? [COMMAND] show help of a given command + \help alias of \? + \q quit tsql + + +Informational + \l list databases + \c show current database + \c [DBNAME] connect to new database + \d list tables + \d [TBNAME] describe table + \df list functions + \df NAME describe function + + +Tool + \! execute a linux shell command + \dfs execute a dfs command + \admin execute Tajo admin command + + +Variables + \set [[NAME] [VALUE] set session variable or list session variables + \unset NAME unset session variable + + +Documentations + tsql guide http://tajo.apache.org/docs/current/cli.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 + Configuration http://tajo.apache.org/docs/current/configuration.html +</pre></div> +</div> +<div class="section" id="basic-usages"> +<h2>Basic usages<a class="headerlink" href="#basic-usages" title="Permalink to this headline">¶</a></h2> +<p><tt class="docutils literal"><span class="pre">\l</span></tt> command shows a list of all databases as follows:</p> +<div class="highlight-python"><div class="highlight"><pre>default> \l +default +tpch +work1 +default> +</pre></div> +</div> +<p><tt class="docutils literal"><span class="pre">\d</span></tt> command shows a list of tables in the current database as follows:</p> +<div class="highlight-python"><div class="highlight"><pre>default> \d +customer +lineitem +nation +orders +part +partsupp +region +supplier +</pre></div> +</div> +<p><tt class="docutils literal"><span class="pre">\d</span> <span class="pre">[table</span> <span class="pre">name]</span></tt> command also shows a table description as follows:</p> +<div class="highlight-python"><div class="highlight"><pre>default> \d orders + +table name: orders +table path: hdfs:/xxx/xxx/tpch/orders +store type: CSV +number of rows: 0 +volume (bytes): 172.0 MB +schema: +o_orderkey INT8 +o_custkey INT8 +o_orderstatus TEXT +o_totalprice FLOAT8 +o_orderdate TEXT +o_orderpriority TEXT +o_clerk TEXT +o_shippriority INT4 +o_comment TEXT +</pre></div> +</div> +<p>The prompt <tt class="docutils literal"><span class="pre">default></span></tt> indicates the current database. Basically, all SQL statements and meta commands work in the current database. Also, you can change the current database with <tt class="docutils literal"><span class="pre">\c</span></tt> command.</p> +<div class="highlight-sql"><div class="highlight"><pre>default> \c work1 +You are now connected to database "test" as user "hyunsik". +work1> +</pre></div> +</div> +<p><tt class="docutils literal"><span class="pre">\df</span></tt> command shows a list of all built-in functions as follows:</p> +<div class="highlight-python"><div class="highlight"><pre>default> \df + Name | Result type | Argument types | Description | Type +-----------------+-----------------+-----------------------+-----------------------------------------------+----------- + abs | INT4 | INT4 | Absolute value | GENERAL + abs | INT8 | INT8 | Absolute value | GENERAL + abs | FLOAT4 | FLOAT4 | Absolute value | GENERAL + abs | FLOAT8 | FLOAT8 | Absolute value | GENERAL + acos | FLOAT8 | FLOAT4 | Inverse cosine. | GENERAL + acos | FLOAT8 | FLOAT8 | Inverse cosine. | GENERAL + utc_usec_to | INT8 | TEXT,INT8 | Extract field from time | GENERAL + utc_usec_to | INT8 | TEXT,INT8,INT4 | Extract field from time | GENERAL + +(181) rows + +For Reference, many details have been omitted in order to present a clear picture of the process. +</pre></div> +</div> +<p><tt class="docutils literal"><span class="pre">\df</span> <span class="pre">[function</span> <span class="pre">name]</span></tt> command also shows a function description as follows:</p> +<div class="highlight-python"><div class="highlight"><pre>default> \df round; + Name | Result type | Argument types | Description | Type +-----------------+-----------------+-----------------------+-----------------------------------------------+----------- + round | INT8 | FLOAT4 | Round to nearest integer. | GENERAL + round | INT8 | FLOAT8 | Round to nearest integer. | GENERAL + round | INT8 | INT4 | Round to nearest integer. | GENERAL + round | INT8 | INT8 | Round to nearest integer. | GENERAL + round | FLOAT8 | FLOAT8,INT4 | Round to s decimalN places. | GENERAL + round | FLOAT8 | INT8,INT4 | Round to s decimalN places. | GENERAL + +(6) rows + +Function: INT8 round(float4) +Description: Round to nearest integer. +Example: +> SELECT round(42.4) +42 + +Function: FLOAT8 round(float8,int4) +Description: Round to s decimalN places. +Example: +> SELECT round(42.4382, 2) +42.44 +</pre></div> +</div> +</div> +</div> + + + </div> + <footer> + + <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> + + <a href="dfs_command.html" class="btn btn-neutral float-right" title="Executing HDFS commands"/>Next <span class="fa fa-arrow-circle-right"></span></a> + + + <a href="../tsql.html" class="btn btn-neutral" title="Tajo Shell (TSQL)"><span class="fa fa-arrow-circle-left"></span> Previous</a> + + </div> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2014, 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.8.0', + 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/current/tsql/single_command.html URL: http://svn.apache.org/viewvc/tajo/site/docs/current/tsql/single_command.html?rev=1644658&view=auto ============================================================================== --- tajo/site/docs/current/tsql/single_command.html (added) +++ tajo/site/docs/current/tsql/single_command.html Thu Dec 11 14:43:31 2014 @@ -0,0 +1,257 @@ + + +<!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>Executing a single command — Apache Tajo 0.8.0 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.8.0 documentation" href="../index.html"/> + <link rel="up" title="Tajo Shell (TSQL)" href="../tsql.html"/> + <link rel="next" title="Executing Queries from Files" href="execute_file.html"/> + <link rel="prev" title="Introducing to TSQL" href="intro.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/prerequisites.html">Prerequisites</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/downloading_source.html">Dowload and unpack the source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/building.html">Build source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/local_setup.html">Setting up a local Tajo cluster</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/first_query.html">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/configuration_defaults.html">Configuration Defaults</a></li> +<li class="toctree-l2"><a class="reference internal" href="../configuration/ha_configuration.html">High Availability for TajoMaster</a></li> +</ul> +</li> +<li class="toctree-l1 current"><a class="reference internal" href="../tsql.html">Tajo Shell (TSQL)</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="meta_command.html">Meta Commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="dfs_command.html">Executing HDFS commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="variables.html">Session Variables</a></li> +<li class="toctree-l2"><a class="reference internal" href="admin_command.html">Administration Commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="intro.html">Introducing to TSQL</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="">Executing a single command</a></li> +<li class="toctree-l2"><a class="reference internal" href="execute_file.html">Executing Queries from Files</a></li> +<li class="toctree-l2"><a class="reference internal" href="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/queries.html">Queries</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> +</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/math_func_and_operators.html">Math Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/string_func_and_operators.html">String Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/datetime_func_and_operators.html">DateTime Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/network_func_and_operators.html">Network Functions and Operators</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../table_management.html">Table Management</a><ul> +<li class="toctree-l2"><a class="reference internal" href="../table_management/file_formats.html">File Formats</a></li> +<li class="toctree-l2"><a class="reference internal" href="../table_management/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="../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="../hcatalog_integration.html">HCatalog Integration</a></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#an-example-jdbc-client">An Example JDBC Client</a></li> +<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#faq">FAQ</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="../tsql.html">Tajo Shell (TSQL)</a> »</li> + + <li>Executing a single command</li> + <li class="wy-breadcrumbs-aside"> + + <a href="../_sources/tsql/single_command.txt" rel="nofollow"> View page source</a> + + </li> + </ul> + <hr/> +</div> + <div role="main"> + + <div class="section" id="executing-a-single-command"> +<h1>Executing a single command<a class="headerlink" href="#executing-a-single-command" title="Permalink to this headline">¶</a></h1> +<p>You may want to run more queries without entering tsql prompt. Tsql provides the <tt class="docutils literal"><span class="pre">-c</span></tt> argument for above requirement. And Tajo assumes that queries are separated by semicolon as follows:</p> +<div class="highlight-sql"><div class="highlight"><pre>$ bin/tsql -c "select count(*) from table1; select sum(score) from table1;" +Progress: 0%, response time: 0.217 sec +Progress: 0%, response time: 0.218 sec +Progress: 100%, response time: 0.317 sec +?count +------------------------------- +5 +(1 rows, 0.317 sec, 2 B selected) +Progress: 0%, response time: 0.202 sec +Progress: 0%, response time: 0.204 sec +Progress: 100%, response time: 0.345 sec +?sum +------------------------------- +15.0 +(1 rows, 0.345 sec, 5 B selected) +</pre></div> +</div> +</div> + + + </div> + <footer> + + <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> + + <a href="execute_file.html" class="btn btn-neutral float-right" title="Executing Queries from Files"/>Next <span class="fa fa-arrow-circle-right"></span></a> + + + <a href="intro.html" class="btn btn-neutral" title="Introducing to TSQL"><span class="fa fa-arrow-circle-left"></span> Previous</a> + + </div> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2014, 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.8.0', + 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/current/tsql/variables.html URL: http://svn.apache.org/viewvc/tajo/site/docs/current/tsql/variables.html?rev=1644658&view=auto ============================================================================== --- tajo/site/docs/current/tsql/variables.html (added) +++ tajo/site/docs/current/tsql/variables.html Thu Dec 11 14:43:31 2014 @@ -0,0 +1,295 @@ + + +<!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>Session Variables — Apache Tajo 0.8.0 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.8.0 documentation" href="../index.html"/> + <link rel="up" title="Tajo Shell (TSQL)" href="../tsql.html"/> + <link rel="next" title="Administration Commands" href="admin_command.html"/> + <link rel="prev" title="Executing HDFS commands" href="dfs_command.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/prerequisites.html">Prerequisites</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/downloading_source.html">Dowload and unpack the source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/building.html">Build source code</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/local_setup.html">Setting up a local Tajo cluster</a></li> +<li class="toctree-l2"><a class="reference internal" href="../getting_started/first_query.html">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/configuration_defaults.html">Configuration Defaults</a></li> +<li class="toctree-l2"><a class="reference internal" href="../configuration/ha_configuration.html">High Availability for TajoMaster</a></li> +</ul> +</li> +<li class="toctree-l1 current"><a class="reference internal" href="../tsql.html">Tajo Shell (TSQL)</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="meta_command.html">Meta Commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="dfs_command.html">Executing HDFS commands</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="">Session Variables</a></li> +<li class="toctree-l2"><a class="reference internal" href="admin_command.html">Administration Commands</a></li> +<li class="toctree-l2"><a class="reference internal" href="intro.html">Introducing to TSQL</a></li> +<li class="toctree-l2"><a class="reference internal" href="single_command.html">Executing a single command</a></li> +<li class="toctree-l2"><a class="reference internal" href="execute_file.html">Executing Queries from Files</a></li> +<li class="toctree-l2"><a class="reference internal" href="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/queries.html">Queries</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> +</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/math_func_and_operators.html">Math Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/string_func_and_operators.html">String Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/datetime_func_and_operators.html">DateTime Functions and Operators</a></li> +<li class="toctree-l2"><a class="reference internal" href="../functions/network_func_and_operators.html">Network Functions and Operators</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../table_management.html">Table Management</a><ul> +<li class="toctree-l2"><a class="reference internal" href="../table_management/file_formats.html">File Formats</a></li> +<li class="toctree-l2"><a class="reference internal" href="../table_management/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="../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="../hcatalog_integration.html">HCatalog Integration</a></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#an-example-jdbc-client">An Example JDBC Client</a></li> +<li class="toctree-l2"><a class="reference internal" href="../jdbc_driver.html#faq">FAQ</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="../tsql.html">Tajo Shell (TSQL)</a> »</li> + + <li>Session Variables</li> + <li class="wy-breadcrumbs-aside"> + + <a href="../_sources/tsql/variables.txt" rel="nofollow"> View page source</a> + + </li> + </ul> + <hr/> +</div> + <div role="main"> + + <div class="section" id="session-variables"> +<h1>Session Variables<a class="headerlink" href="#session-variables" title="Permalink to this headline">¶</a></h1> +<p>Each client connection to TajoMaster creates a unique session, and the client and TajoMaster uses the session until disconnect. A session provides session variables which are used for various configs per session.</p> +<p><tt class="docutils literal"><span class="pre">tsql</span></tt> provides the meta command <tt class="docutils literal"><span class="pre">\set</span></tt> to manipulate session variables. Just <tt class="docutils literal"><span class="pre">\set</span></tt> command shows all session variables.</p> +<div class="highlight-python"><div class="highlight"><pre>default> \set +'name1'='val1' +'name2'='val2' +'name3'='val3' + ... +</pre></div> +</div> +<p><tt class="docutils literal"><span class="pre">\set</span> <span class="pre">key</span> <span class="pre">val</span></tt> will set the session variable named <em>key</em> with the value <em>val</em>.</p> +<div class="highlight-python"><div class="highlight"><pre>default> \set +'CURRENT_DATABASE'='default' + +default> \set key1 val1 + +default> \set +'CURRENT_DATABASE'='default' +'key1'='val1' +</pre></div> +</div> +<p>Also, <tt class="docutils literal"><span class="pre">\unset</span> <span class="pre">key</span></tt> will unset the session variable named <em>key</em>.</p> +<p>Now, tajo provides the following session variables.</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">DIST_QUERY_BROADCAST_JOIN_THRESHOLD</span></tt></li> +<li><tt class="docutils literal"><span class="pre">DIST_QUERY_JOIN_TASK_VOLUME</span></tt></li> +<li><tt class="docutils literal"><span class="pre">DIST_QUERY_SORT_TASK_VOLUME</span></tt></li> +<li><tt class="docutils literal"><span class="pre">DIST_QUERY_GROUPBY_TASK_VOLUME</span></tt></li> +<li><tt class="docutils literal"><span class="pre">DIST_QUERY_JOIN_PARTITION_VOLUME</span></tt></li> +<li><tt class="docutils literal"><span class="pre">DIST_QUERY_GROUPBY_PARTITION_VOLUME</span></tt></li> +<li><tt class="docutils literal"><span class="pre">DIST_QUERY_TABLE_PARTITION_VOLUME</span></tt></li> +<li><tt class="docutils literal"><span class="pre">EXECUTOR_EXTERNAL_SORT_BUFFER_SIZE</span></tt></li> +<li><tt class="docutils literal"><span class="pre">EXECUTOR_HASH_JOIN_SIZE_THRESHOLD</span></tt></li> +<li><tt class="docutils literal"><span class="pre">EXECUTOR_INNER_HASH_JOIN_SIZE_THRESHOLD</span></tt></li> +<li><tt class="docutils literal"><span class="pre">EXECUTOR_OUTER_HASH_JOIN_SIZE_THRESHOLD</span></tt></li> +<li><tt class="docutils literal"><span class="pre">EXECUTOR_GROUPBY_INMEMORY_HASH_THRESHOLD</span></tt></li> +<li><tt class="docutils literal"><span class="pre">MAX_OUTPUT_FILE_SIZE</span></tt></li> +<li><tt class="docutils literal"><span class="pre">CODEGEN</span></tt></li> +<li><tt class="docutils literal"><span class="pre">CLIENT_SESSION_EXPIRY_TIME</span></tt></li> +<li><tt class="docutils literal"><span class="pre">CLI_MAX_COLUMN</span></tt></li> +<li><tt class="docutils literal"><span class="pre">CLI_NULL_CHAR</span></tt></li> +<li><tt class="docutils literal"><span class="pre">CLI_PRINT_PAUSE_NUM_RECORDS</span></tt></li> +<li><tt class="docutils literal"><span class="pre">CLI_PRINT_PAUSE</span></tt></li> +<li><tt class="docutils literal"><span class="pre">CLI_PRINT_ERROR_TRACE</span></tt></li> +<li><tt class="docutils literal"><span class="pre">CLI_OUTPUT_FORMATTER_CLASS</span></tt></li> +<li><tt class="docutils literal"><span class="pre">CLI_ERROR_STOP</span></tt></li> +<li><tt class="docutils literal"><span class="pre">TIMEZONE</span></tt></li> +<li><tt class="docutils literal"><span class="pre">DATE_ORDER</span></tt></li> +<li><tt class="docutils literal"><span class="pre">CSVFILE_NULL</span></tt></li> +<li><tt class="docutils literal"><span class="pre">DEBUG_ENABLED</span></tt></li> +<li><tt class="docutils literal"><span class="pre">TEST_BROADCAST_JOIN_ENABLED</span></tt></li> +<li><tt class="docutils literal"><span class="pre">TEST_JOIN_OPT_ENABLED</span></tt></li> +<li><tt class="docutils literal"><span class="pre">TEST_FILTER_PUSHDOWN_ENABLED</span></tt></li> +<li><tt class="docutils literal"><span class="pre">TEST_MIN_TASK_NUM</span></tt></li> +<li><tt class="docutils literal"><span class="pre">BEHAVIOR_ARITHMETIC_ABORT</span></tt></li> +<li><tt class="docutils literal"><span class="pre">RESULT_SET_FETCH_ROWNUM</span></tt></li> +</ul> +</div> + + + </div> + <footer> + + <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> + + <a href="admin_command.html" class="btn btn-neutral float-right" title="Administration Commands"/>Next <span class="fa fa-arrow-circle-right"></span></a> + + + <a href="dfs_command.html" class="btn btn-neutral" title="Executing HDFS commands"><span class="fa fa-arrow-circle-left"></span> Previous</a> + + </div> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2014, 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.8.0', + 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
