You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ch...@apache.org on 2017/09/29 01:55:12 UTC
[1/3] carbondata-site git commit: added link for partition table
guide and updated the conf and pdf
Repository: carbondata-site
Updated Branches:
refs/heads/asf-site 87359ad14 -> 9fffc177d
added link for partition table guide and updated the conf and pdf
Project: http://git-wip-us.apache.org/repos/asf/carbondata-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata-site/commit/b226d16f
Tree: http://git-wip-us.apache.org/repos/asf/carbondata-site/tree/b226d16f
Diff: http://git-wip-us.apache.org/repos/asf/carbondata-site/diff/b226d16f
Branch: refs/heads/asf-site
Commit: b226d16f848f04c1530f6a31bf82e0281c8ddd2a
Parents: 87359ad
Author: PallaviSingh1992 <pa...@yahoo.co.in>
Authored: Thu Sep 28 10:58:40 2017 +0530
Committer: PallaviSingh1992 <pa...@yahoo.co.in>
Committed: Thu Sep 28 10:58:40 2017 +0530
----------------------------------------------------------------------
src/main/resources/application.conf | 3 +-
src/main/webapp/configuration-parameters.html | 138 ++++++++-
src/main/webapp/data-management.html | 4 +-
src/main/webapp/installation-guide.html | 5 +-
src/main/webapp/mainpage.html | 1 +
src/main/webapp/partition-guide.html | 342 +++++++++++++++++++++
src/main/webapp/pdf/maven-pdf-plugin.pdf | Bin 235235 -> 248692 bytes
src/site/pdf.xml | 1 +
8 files changed, 477 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/b226d16f/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf
index c7f35cd..037a7d4 100644
--- a/src/main/resources/application.conf
+++ b/src/main/resources/application.conf
@@ -7,7 +7,8 @@ fileList=["configuration-parameters",
"installation-guide",
"supported-data-types-in-carbondata",
"troubleshooting",
- "useful-tips-on-carbondata"
+ "useful-tips-on-carbondata",
+ "partition-guide"
]
fileListToRetain=["quick-start-guide",
"installation-guide"
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/b226d16f/src/main/webapp/configuration-parameters.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/configuration-parameters.html b/src/main/webapp/configuration-parameters.html
index c21d61a..9adaac3 100644
--- a/src/main/webapp/configuration-parameters.html
+++ b/src/main/webapp/configuration-parameters.html
@@ -173,6 +173,7 @@
<li><a href="#performance-configuration">Performance Configuration</a></li>
<li><a href="#miscellaneous-configuration">Miscellaneous Configuration</a></li>
<li><a href="#spark-configuration">Spark Configuration</a></li>
+<li><a href="#dynamic-configuration-in-carbondata-using-set-reset">Dynamic Configuration In CarbonData Using SET-RESET</a></li>
</ul>
<h2>
<a id="system-configuration" class="anchor" href="#system-configuration" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>System Configuration</h2>
@@ -401,23 +402,11 @@
<td></td>
</tr>
<tr>
-<td>carbon.inmemory.record.size</td>
-<td>120000</td>
-<td>Number of records to be in memory while querying.</td>
-<td>Min=100000 and Max=240000</td>
-</tr>
-<tr>
<td>carbon.enable.quick.filter</td>
<td>false</td>
<td>Improves the performance of filter query.</td>
<td></td>
</tr>
-<tr>
-<td>no.of.cores.to.load.blocks.in.driver</td>
-<td>10</td>
-<td>Number of core to load the blocks in driver.</td>
-<td></td>
-</tr>
</tbody>
</table>
<h2>
@@ -622,6 +611,131 @@
</tr>
</tbody>
</table>
+<h2>
+<a id="dynamic-configuration-in-carbondata-using-set-reset" class="anchor" href="#dynamic-configuration-in-carbondata-using-set-reset" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Dynamic Configuration In CarbonData Using SET-RESET</h2>
+<p><strong>SET/RESET</strong> commands are used to add, update, display, or reset the carbondata properties dynamically without restarting the driver.</p>
+<p><strong>Syntax</strong></p>
+<ul>
+<li>
+<strong>Add or Update :</strong> This command adds or updates the value of parameter_name.</li>
+</ul>
+<pre><code>SET parameter_name=parameter_value
+</code></pre>
+<ul>
+<li>Display Property Value: This command displays the value of the specified parameter_name.</li>
+</ul>
+<pre><code>SET parameter_name
+</code></pre>
+<ul>
+<li>Display Session Parameters: This command displays all the supported session parameters.</li>
+</ul>
+<pre><code>SET
+</code></pre>
+<ul>
+<li>Display Session Parameters along with usage details: This command displays all the supported session parameters along with their usage details.</li>
+</ul>
+<pre><code>SET -v
+</code></pre>
+<ul>
+<li>Reset: This command clears all the session parameters.</li>
+</ul>
+<pre><code>RESET
+</code></pre>
+<p><strong>Parameter Description:</strong></p>
+<table>
+<thead>
+<tr>
+<th>Parameter</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>parameter_name</td>
+<td>Name of the property whose value needs to be dynamically added, updated, or displayed.</td>
+</tr>
+<tr>
+<td>parameter_value</td>
+<td>New value of the parameter_name to be set.</td>
+</tr>
+</tbody>
+</table>
+<p><b></b></p><p align="center">Dynamically Configurable Properties of CarbonData</p>
+<table>
+<thead>
+<tr>
+<th>Properties</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>carbon.options.bad.records.logger.enable</td>
+<td>To enable or disable bad record logger.</td>
+</tr>
+<tr>
+<td>carbon.options.bad.records.action</td>
+<td>This property can have four types of actions for bad records FORCE, REDIRECT, IGNORE and FAIL. If set to FORCE then it auto-corrects the data by storing the bad records as NULL. If set to REDIRECT then bad records are written to the raw CSV instead of being loaded. If set to IGNORE then bad records are neither loaded nor written to the raw CSV. If set to FAIL then data loading fails if any bad records are found.</td>
+</tr>
+<tr>
+<td>carbon.options.is.empty.data.bad.record</td>
+<td>If false, then empty ("" or '' or ,,) data will not be considered as bad record and vice versa.</td>
+</tr>
+<tr>
+<td>carbon.options.sort.scope</td>
+<td>This property can have four possible values BATCH_SORT, LOCAL_SORT, GLOBAL_SORT and NO_SORT. If set to BATCH_SORT, the sorting scope is smaller and more index tree will be created,thus loading is faster but query maybe slower. If set to LOCAL_SORT, the sorting scope is bigger and one index tree per data node will be created, thus loading is slower but query is faster. If set to GLOBAL_SORT, the sorting scope is bigger and one index tree per task will be created, thus loading is slower but query is faster. If set to NO_SORT data will be loaded in unsorted manner.</td>
+</tr>
+<tr>
+<td>carbon.options.batch.sort.size.inmb</td>
+<td>Size of batch data to keep in memory, as a thumb rule it supposed to be less than 45% of sort.inmemory.size.inmb otherwise it may spill intermediate data to disk.</td>
+</tr>
+<tr>
+<td>carbon.options.single.pass</td>
+<td>Single Pass Loading enables single job to finish data loading with dictionary generation on the fly. It enhances performance in the scenarios where the subsequent data loading after initial load involves fewer incremental updates on the dictionary. This option specifies whether to use single pass for loading data or not. By default this option is set to FALSE.</td>
+</tr>
+<tr>
+<td>carbon.options.bad.record.path</td>
+<td>Specifies the HDFS path where bad records needs to be stored.</td>
+</tr>
+<tr>
+<td>carbon.options.global.sort.partitions</td>
+<td>The Number of partitions to use when shuffling data for sort. If user don't configurate or configurate it less than 1, it uses the number of map tasks as reduce tasks. In general, we recommend 2-3 tasks per CPU core in your cluster.</td>
+</tr>
+<tr>
+<td>carbon.custom.block.distribution</td>
+<td>Specifies whether to use the Spark or Carbon block distribution feature.</td>
+</tr>
+<tr>
+<td>enable.unsafe.sort</td>
+<td>Specifies whether to use unsafe sort during data loading. Unsafe sort reduces the garbage collection during data load operation, resulting in better performance.</td>
+</tr>
+</tbody>
+</table>
+<p><strong>Examples:</strong></p>
+<ul>
+<li>Add or Update:</li>
+</ul>
+<pre><code>SET enable.unsafe.sort =true
+</code></pre>
+<ul>
+<li>Display Property Value:</li>
+</ul>
+<pre><code>SET enable.unsafe.sort
+</code></pre>
+<ul>
+<li>Reset:</li>
+</ul>
+<pre><code>RESET
+</code></pre>
+<p><strong>System Response:</strong></p>
+<ul>
+<li>
+<p>Success will be recorded in the driver log.</p>
+</li>
+<li>
+<p>Failure will be displayed in the UI.</p>
+</li>
+</ul>
</div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/b226d16f/src/main/webapp/data-management.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/data-management.html b/src/main/webapp/data-management.html
index ec1d60c..1396652 100644
--- a/src/main/webapp/data-management.html
+++ b/src/main/webapp/data-management.html
@@ -298,7 +298,7 @@ The status of deleted segment is updated to Marked for delete / Marked for Updat
<p>Example :</p>
<pre><code>CLEAN FILES FOR TABLE table1
</code></pre>
-<p>This DML will physically delete the segment which are "Marked for delete" immediately.</p>
+<p>This DML will physically delete the segment which are "Marked for delete" and "Compacted" immediately.</p>
<h2>
<a id="compacting-data" class="anchor" href="#compacting-data" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Compacting Data</h2>
<ul>
@@ -344,7 +344,7 @@ run parallel with data load. There are 2 levels in minor compaction.</p>
<td>carbon.compaction.level.threshold</td>
<td>4, 3</td>
<td>Minor</td>
-<td>This property is for minor compaction which decides how many segments to be merged. Example: If it is set as 2, 3 then minor compaction will be triggered for every 2 segments. 3 is the number of level 1 compacted segment which is further compacted to new segment.</td>
+<td>This property is for minor compaction which decides how many segments to be merged. Example: If it is set as "2, 3", then minor compaction will be triggered for every 2 segments in level 1. 3 is the number of level 1 compacted segment which is further compacted to new segment in level 2.</td>
<td>NA</td>
</tr>
<tr>
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/b226d16f/src/main/webapp/installation-guide.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/installation-guide.html b/src/main/webapp/installation-guide.html
index 3bfcba2..12f0a7f 100644
--- a/src/main/webapp/installation-guide.html
+++ b/src/main/webapp/installation-guide.html
@@ -432,10 +432,11 @@ hdfs://<host_name>:port/user/hive/warehouse/carbon.store
<h3>
<a id="connecting-to-carbondata-thrift-server-using-beeline" class="anchor" href="#connecting-to-carbondata-thrift-server-using-beeline" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Connecting to CarbonData Thrift Server Using Beeline.</h3>
<pre><code> cd $SPARK_HOME
- ./bin/beeline jdbc:hive2://<thriftserver_host>:port
+ ./sbin/start-thriftserver.sh
+ ./bin/beeline -u jdbc:hive2://<thriftserver_host>:port
Example
- ./bin/beeline jdbc:hive2://10.10.10.10:10000
+ ./bin/beeline -u jdbc:hive2://10.10.10.10:10000
</code></pre>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/b226d16f/src/main/webapp/mainpage.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/mainpage.html b/src/main/webapp/mainpage.html
index f0056fe..1127f9f 100644
--- a/src/main/webapp/mainpage.html
+++ b/src/main/webapp/mainpage.html
@@ -190,6 +190,7 @@
Operations on CarbonData</a></li>
<li><a href="dml-operation-on-carbondata.html">DML
Operations on CarbonData</a></li>
+ <li><a href="partition-guide.html">Partition Table</a></li>
<li><a href="installation-guide.html">Installation Guide</a></li>
<li><a href="configuration-parameters.html">Configuring
CarbonData</a></li>
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/b226d16f/src/main/webapp/partition-guide.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/partition-guide.html b/src/main/webapp/partition-guide.html
new file mode 100644
index 0000000..a9a1f8c
--- /dev/null
+++ b/src/main/webapp/partition-guide.html
@@ -0,0 +1,342 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link href='images/favicon.ico' rel='shortcut icon' type='image/x-icon'>
+ <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
+ <title>CarbonData</title>
+ <style>
+
+ </style>
+ <!-- Bootstrap -->
+
+ <link rel="stylesheet" href="css/bootstrap.min.css">
+ <link href="css/style.css" rel="stylesheet">
+ <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+ <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+ <!--[if lt IE 9]>
+ <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+ <script src="https://oss.maxcdn.scom/respond/1.4.2/respond.min.js"></script>
+ <![endif]-->
+ <script src="js/jquery.min.js"></script>
+ <script src="js/bootstrap.min.js"></script>
+
+
+</head>
+<body>
+<header>
+ <nav class="navbar navbar-default navbar-custom cd-navbar-wrapper">
+ <div class="container">
+ <div class="navbar-header">
+ <button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse"
+ class="navbar-toggle collapsed" type="button">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a href="index.html" class="logo">
+ <img src="images/CarbonDataLogo.png" alt="CarbonData logo" title="CarbocnData logo"/>
+ </a>
+ </div>
+ <div class="navbar-collapse collapse cd_navcontnt" id="navbar">
+ <ul class="nav navbar-nav navbar-right navlist-custom">
+ <li><a href="index.html" class="hidden-xs"><i class="fa fa-home" aria-hidden="true"></i> </a>
+ </li>
+ <li><a href="index.html" class="hidden-lg hidden-md hidden-sm">Home</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle " data-toggle="dropdown" role="button" aria-haspopup="true"
+ aria-expanded="false"> Download <span class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li>
+ <a href="https://dist.apache.org/repos/dist/release/carbondata/1.1.1/"
+ target="_blank">Apache CarbonData 1.1.1</a></li>
+ <li>
+ <a href="https://dist.apache.org/repos/dist/release/carbondata/1.1.0/"
+ target="_blank">Apache CarbonData 1.1.0</a></li>
+ <li>
+ <a href="http://archive.apache.org/dist/incubator/carbondata/1.0.0-incubating/"
+ target="_blank">Apache CarbonData 1.0.0</a></li>
+ <li>
+ <a href="http://archive.apache.org/dist/incubator/carbondata/0.2.0-incubating/"
+ target="_blank">Apache CarbonData 0.2.0</a></li>
+ <li>
+ <a href="http://archive.apache.org/dist/incubator/carbondata/0.1.1-incubating/"
+ target="_blank">Apache CarbonData 0.1.1</a></li>
+ <li>
+ <a href="http://archive.apache.org/dist/incubator/carbondata/0.1.0-incubating/"
+ target="_blank">Apache CarbonData 0.1.0</a></li>
+ <li>
+ <a href="https://cwiki.apache.org/confluence/display/CARBONDATA/Releases"
+ target="_blank">Release Archive</a></li>
+ </ul>
+ </li>
+ <li><a href="mainpage.html" class="active">Documentation</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
+ aria-expanded="false">Community <span class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li>
+ <a href="https://github.com/apache/carbondata/blob/master/docs/How-to-contribute-to-Apache-CarbonData.md"
+ target="_blank">Contributing to CarbonData</a></li>
+ <li>
+ <a href="https://github.com/apache/carbondata/blob/master/docs/release-guide.md"
+ target="_blank">Release Guide</a></li>
+ <li>
+ <a href="https://cwiki.apache.org/confluence/display/CARBONDATA/PMC+and+Committers+member+list"
+ target="_blank">Project PMC and Committers</a></li>
+ <li>
+ <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=66850609"
+ target="_blank">CarbonData Meetups</a></li>
+ <li><a href="security.html">Apache CarbonData Security</a></li>
+ <li><a href="https://issues.apache.org/jira/browse/CARBONDATA" target="_blank">Apache
+ Jira</a></li>
+ <li><a href="videogallery.html">CarbonData Videos </a></li>
+ </ul>
+ </li>
+ <li class="dropdown">
+ <a href="http://www.apache.org/" class="apache_link hidden-xs dropdown-toggle"
+ data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Apache</a>
+ <ul class="dropdown-menu">
+ <li><a href="http://www.apache.org/" target="_blank">Apache Homepage</a></li>
+ <li><a href="http://www.apache.org/licenses/" target="_blank">License</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html"
+ target="_blank">Sponsorship</a></li>
+ <li><a href="http://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a></li>
+ </ul>
+ </li>
+
+ <li class="dropdown">
+ <a href="http://www.apache.org/" class="hidden-lg hidden-md hidden-sm dropdown-toggle"
+ data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Apache</a>
+ <ul class="dropdown-menu">
+ <li><a href="http://www.apache.org/" target="_blank">Apache Homepage</a></li>
+ <li><a href="http://www.apache.org/licenses/" target="_blank">License</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html"
+ target="_blank">Sponsorship</a></li>
+ <li><a href="http://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="#" id="search-icon"><i class="fa fa-search" aria-hidden="true"></i></a>
+
+ </li>
+
+ </ul>
+ </div><!--/.nav-collapse -->
+ <div id="search-box">
+ <form method="get" action="http://www.google.com/search" target="_blank">
+ <div class="search-block">
+ <table border="0" cellpadding="0" width="100%">
+ <tr>
+ <td style="width:80%">
+ <input type="text" name="q" size=" 5" maxlength="255" value=""
+ class="search-input" placeholder="Search...." required/>
+ </td>
+ <td style="width:20%">
+ <input type="submit" value="Search"/></td>
+ </tr>
+ <tr>
+ <td align="left" style="font-size:75%" colspan="2">
+ <input type="checkbox" name="sitesearch" value="carbondata.apache.org" checked/>
+ <span style=" position: relative; top: -3px;"> Only search for CarbonData</span>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </form>
+ </div>
+ </div>
+ </nav>
+</header> <!-- end Header part -->
+
+<div class="fixed-padding"></div> <!-- top padding with fixde header -->
+
+<section><!-- Dashboard nav -->
+ <div class="container-fluid q">
+ <div class="col-sm-12 col-md-12 maindashboard">
+ <div class="row">
+ <section>
+ <div style="padding:10px 15px;">
+ <div id="viewpage" name="viewpage">
+ <div class="row">
+ <div class="col-sm-12 col-md-12">
+ <div>
+<h1>
+<a id="carbondata-partition-table-guide" class="anchor" href="#carbondata-partition-table-guide" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>CarbonData Partition Table Guide</h1>
+<p>This tutorial is designed to provide a quick introduction to create and use partition table in Apache CarbonData.</p>
+<ul>
+<li>
+<a href="#create-partition-table">Create Partition Table</a>
+<ul>
+<li><a href="#create-hash-partition-table">Create Hash Partition Table</a></li>
+<li><a href="#create-range-partition-table">Create Range Partition Table</a></li>
+<li><a href="#create-list-partition-table">Create List Partition Table</a></li>
+</ul>
+</li>
+<li><a href="#show-partitions">Show Partitions</a></li>
+<li><a href="#maintaining-the-partitions">Maintaining the Partitions</a></li>
+<li><a href="#partition-id">Partition Id</a></li>
+<li><a href="#useful-tips">Useful Tips</a></li>
+</ul>
+<h2>
+<a id="create-partition-table" class="anchor" href="#create-partition-table" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Create Partition Table</h2>
+<h3>
+<a id="create-hash-partition-table" class="anchor" href="#create-hash-partition-table" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Create Hash Partition Table</h3>
+<pre><code> CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
+ [(col_name data_type , ...)]
+ PARTITIONED BY (partition_col_name data_type)
+ STORED BY 'carbondata'
+ [TBLPROPERTIES ('PARTITION_TYPE'='HASH',
+ 'PARTITION_NUM'='N' ...)]
+ //N is the number of hash partitions
+</code></pre>
+<p>Example:</p>
+<pre><code> create table if not exists hash_partition_table(
+ col_A String,
+ col_B Int,
+ col_C Long,
+ col_D Decimal(10,2),
+ col_F Timestamp
+ ) partitioned by (col_E Long)
+ stored by 'carbondata'
+ tblproperties('partition_type'='Hash','partition_num'='9')
+</code></pre>
+<h3>
+<a id="create-range-partition-table" class="anchor" href="#create-range-partition-table" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Create Range Partition Table</h3>
+<pre><code> CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
+ [(col_name data_type , ...)]
+ PARTITIONED BY (partition_col_name data_type)
+ STORED BY 'carbondata'
+ [TBLPROPERTIES ('PARTITION_TYPE'='RANGE',
+ 'RANGE_INFO'='2014-01-01, 2015-01-01, 2016-01-01' ...)]
+</code></pre>
+<p><strong>Note:</strong></p>
+<ul>
+<li>
+<p>The 'RANGE_INFO' must be defined in ascending order in the table properties.</p>
+</li>
+<li>
+<p>The default format for partition column of Date/Timestamp type is yyyy-MM-dd. Alternate formats for Date/Timestamp could be defined in CarbonProperties.</p>
+</li>
+</ul>
+<p>Example:</p>
+<pre><code> create table if not exists hash_partition_table(
+ col_A String,
+ col_B Int,
+ col_C Long,
+ col_D Decimal(10,2),
+ col_E Long
+ ) partitioned by (col_F Timestamp)
+ stored by 'carbondata'
+ tblproperties('partition_type'='Range',
+ 'range_info'='2015-01-01, 2016-01-01, 2017-01-01, 2017-02-01')
+</code></pre>
+<h3>
+<a id="create-list-partition-table" class="anchor" href="#create-list-partition-table" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Create List Partition Table</h3>
+<pre><code> CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
+ [(col_name data_type , ...)]
+ PARTITIONED BY (partition_col_name data_type)
+ STORED BY 'carbondata'
+ [TBLPROPERTIES ('PARTITION_TYPE'='LIST',
+ 'LIST_INFO'='A, B, C' ...)]
+</code></pre>
+<p><strong>Note :</strong></p>
+<ul>
+<li>List partition supports list info in one level group.</li>
+</ul>
+<p>Example:</p>
+<pre><code> create table if not exists hash_partition_table(
+ col_B Int,
+ col_C Long,
+ col_D Decimal(10,2),
+ col_E Long,
+ col_F Timestamp
+ ) partitioned by (col_A String)
+ stored by 'carbondata'
+ tblproperties('partition_type'='List',
+ 'list_info'='aaaa, bbbb, (cccc, dddd), eeee')
+</code></pre>
+<h2>
+<a id="show-partitions" class="anchor" href="#show-partitions" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Show Partitions</h2>
+<p>The following command is executed to get the partition information of the table</p>
+<pre><code> SHOW PARTITIONS [db_name.]table_name
+</code></pre>
+<h2>
+<a id="maintaining-the-partitions" class="anchor" href="#maintaining-the-partitions" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Maintaining the Partitions</h2>
+<h3>
+<a id="add-a-new-partition" class="anchor" href="#add-a-new-partition" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Add a new partition</h3>
+<pre><code> ALTER TABLE [db_name].table_name ADD PARTITION('new_partition')
+</code></pre>
+<h3>
+<a id="split-a-partition" class="anchor" href="#split-a-partition" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Split a partition</h3>
+<pre><code> ALTER TABLE [db_name].table_name SPLIT PARTITION(partition_id)
+ INTO('new_partition1', 'new_partition2'...)
+</code></pre>
+<h3>
+<a id="drop-a-partition" class="anchor" href="#drop-a-partition" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Drop a partition</h3>
+<pre><code> //Drop partition definition only and keep data
+ ALTER TABLE [db_name].table_name DROP PARTITION(partition_id)
+
+ //Drop both partition definition and data
+ ALTER TABLE [db_name].table_name DROP PARTITION(partition_id) WITH DATA
+</code></pre>
+<p><strong>Note</strong>:</p>
+<ul>
+<li>
+<p>In the first case where the data in the table is preserved there can be multiple scenarios as described below :</p>
+<ul>
+<li>
+<p>if the table is a range partition table, data will be merged into the next partition, and if the dropped partition is the last partition, then data will be merged into the default partition.</p>
+</li>
+<li>
+<p>if the table is a list partition table, data will be merged into default partition.</p>
+</li>
+</ul>
+</li>
+<li>
+<p>Dropping the default partition is not allowed, but DELETE statement can be used to delete data in default partition.</p>
+</li>
+<li>
+<p>The partition_id could be fetched using the <a href="#show-partitions">SHOW PARTITIONS</a> command.</p>
+</li>
+<li>
+<p>Hash partition table is not supported for ADD, SPLIT and DROP commands.</p>
+</li>
+</ul>
+<h2>
+<a id="partition-id" class="anchor" href="#partition-id" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Partition Id</h2>
+<p>In CarbonData like the hive, folders are not used to divide partitions instead partition id is used to replace the task id. It could make use of the characteristic and meanwhile reduce some metadata.</p>
+<pre><code>SegmentDir/0_batchno0-0-1502703086921.carbonindex
+ ^
+SegmentDir/part-0-0_batchno0-0-1502703086921.carbondata
+ ^
+</code></pre>
+<h2>
+<a id="useful-tips" class="anchor" href="#useful-tips" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Useful Tips</h2>
+<p>Here are some useful tips to improve query performance of carbonData partition table:</p>
+<p><strong>Prior analysis of proper partition column</strong></p>
+<p>The distribution of data based on some random column could be skewed, building a skewed partition table is meaningless. Some basic statistical analysis before the creation of partition table can avoid an extremely skewed column.</p>
+<p><strong>Exclude partition column from sort columns</strong></p>
+<p>If you have many dimensions, that need to be sorted then one must exclude column present in the partition from sort columns, this will allow another dimension to do the efficient sorting.</p>
+<p><strong>Remember to add filter on partition column when writing SQL</strong></p>
+<p>When writing SQL on a partition table, try to use filters on the partition column.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="doc-footer">
+ <a href="#top" class="scroll-top">Top</a>
+</div>
+</div>
+</section>
+</div>
+</div>
+</div>
+</section><!-- End systemblock part -->
+<script src="js/custom.js"></script>
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/b226d16f/src/main/webapp/pdf/maven-pdf-plugin.pdf
----------------------------------------------------------------------
diff --git a/src/main/webapp/pdf/maven-pdf-plugin.pdf b/src/main/webapp/pdf/maven-pdf-plugin.pdf
index 170d4d6..e45d97d 100644
Binary files a/src/main/webapp/pdf/maven-pdf-plugin.pdf and b/src/main/webapp/pdf/maven-pdf-plugin.pdf differ
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/b226d16f/src/site/pdf.xml
----------------------------------------------------------------------
diff --git a/src/site/pdf.xml b/src/site/pdf.xml
index b11b3cc..2f0b1fe 100644
--- a/src/site/pdf.xml
+++ b/src/site/pdf.xml
@@ -15,6 +15,7 @@
<item name="Data Management" ref='data-management.md'/>
<item name="DDL" ref='ddl-operation-on-carbondata.md'/>
<item name="DML" ref='dml-operation-on-carbondata.md '/>
+ <item name="Partition Table" ref='partition-guide.md '/>
<item name="Installation" ref='installation-guide.md'/>
<item name="Configuring CarbonData" ref='configuration-parameters.md'/>
<item name="FAQs" ref='faq.md'/>
[3/3] carbondata-site git commit: Added link for partition table
guide and updated the conf
Posted by ch...@apache.org.
Added link for partition table guide and updated the conf
Project: http://git-wip-us.apache.org/repos/asf/carbondata-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata-site/commit/9fffc177
Tree: http://git-wip-us.apache.org/repos/asf/carbondata-site/tree/9fffc177
Diff: http://git-wip-us.apache.org/repos/asf/carbondata-site/diff/9fffc177
Branch: refs/heads/asf-site
Commit: 9fffc177dc23129ae9540a70179749c4fd13fb7f
Parents: 5a7d4dc
Author: chenliang613 <ch...@apache.org>
Authored: Fri Sep 29 09:54:49 2017 +0800
Committer: chenliang613 <ch...@apache.org>
Committed: Fri Sep 29 09:54:49 2017 +0800
----------------------------------------------------------------------
content/WEB-INF/classes/application.conf | 3 +-
content/configuration-parameters.html | 138 ++++++++++-
content/data-management.html | 4 +-
content/installation-guide.html | 5 +-
content/mainpage.html | 1 +
content/partition-guide.html | 342 ++++++++++++++++++++++++++
content/pdf/maven-pdf-plugin.pdf | Bin 235235 -> 248692 bytes
7 files changed, 476 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9fffc177/content/WEB-INF/classes/application.conf
----------------------------------------------------------------------
diff --git a/content/WEB-INF/classes/application.conf b/content/WEB-INF/classes/application.conf
index c7f35cd..037a7d4 100644
--- a/content/WEB-INF/classes/application.conf
+++ b/content/WEB-INF/classes/application.conf
@@ -7,7 +7,8 @@ fileList=["configuration-parameters",
"installation-guide",
"supported-data-types-in-carbondata",
"troubleshooting",
- "useful-tips-on-carbondata"
+ "useful-tips-on-carbondata",
+ "partition-guide"
]
fileListToRetain=["quick-start-guide",
"installation-guide"
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9fffc177/content/configuration-parameters.html
----------------------------------------------------------------------
diff --git a/content/configuration-parameters.html b/content/configuration-parameters.html
index c21d61a..9adaac3 100644
--- a/content/configuration-parameters.html
+++ b/content/configuration-parameters.html
@@ -173,6 +173,7 @@
<li><a href="#performance-configuration">Performance Configuration</a></li>
<li><a href="#miscellaneous-configuration">Miscellaneous Configuration</a></li>
<li><a href="#spark-configuration">Spark Configuration</a></li>
+<li><a href="#dynamic-configuration-in-carbondata-using-set-reset">Dynamic Configuration In CarbonData Using SET-RESET</a></li>
</ul>
<h2>
<a id="system-configuration" class="anchor" href="#system-configuration" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>System Configuration</h2>
@@ -401,23 +402,11 @@
<td></td>
</tr>
<tr>
-<td>carbon.inmemory.record.size</td>
-<td>120000</td>
-<td>Number of records to be in memory while querying.</td>
-<td>Min=100000 and Max=240000</td>
-</tr>
-<tr>
<td>carbon.enable.quick.filter</td>
<td>false</td>
<td>Improves the performance of filter query.</td>
<td></td>
</tr>
-<tr>
-<td>no.of.cores.to.load.blocks.in.driver</td>
-<td>10</td>
-<td>Number of core to load the blocks in driver.</td>
-<td></td>
-</tr>
</tbody>
</table>
<h2>
@@ -622,6 +611,131 @@
</tr>
</tbody>
</table>
+<h2>
+<a id="dynamic-configuration-in-carbondata-using-set-reset" class="anchor" href="#dynamic-configuration-in-carbondata-using-set-reset" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Dynamic Configuration In CarbonData Using SET-RESET</h2>
+<p><strong>SET/RESET</strong> commands are used to add, update, display, or reset the carbondata properties dynamically without restarting the driver.</p>
+<p><strong>Syntax</strong></p>
+<ul>
+<li>
+<strong>Add or Update :</strong> This command adds or updates the value of parameter_name.</li>
+</ul>
+<pre><code>SET parameter_name=parameter_value
+</code></pre>
+<ul>
+<li>Display Property Value: This command displays the value of the specified parameter_name.</li>
+</ul>
+<pre><code>SET parameter_name
+</code></pre>
+<ul>
+<li>Display Session Parameters: This command displays all the supported session parameters.</li>
+</ul>
+<pre><code>SET
+</code></pre>
+<ul>
+<li>Display Session Parameters along with usage details: This command displays all the supported session parameters along with their usage details.</li>
+</ul>
+<pre><code>SET -v
+</code></pre>
+<ul>
+<li>Reset: This command clears all the session parameters.</li>
+</ul>
+<pre><code>RESET
+</code></pre>
+<p><strong>Parameter Description:</strong></p>
+<table>
+<thead>
+<tr>
+<th>Parameter</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>parameter_name</td>
+<td>Name of the property whose value needs to be dynamically added, updated, or displayed.</td>
+</tr>
+<tr>
+<td>parameter_value</td>
+<td>New value of the parameter_name to be set.</td>
+</tr>
+</tbody>
+</table>
+<p><b></b></p><p align="center">Dynamically Configurable Properties of CarbonData</p>
+<table>
+<thead>
+<tr>
+<th>Properties</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>carbon.options.bad.records.logger.enable</td>
+<td>To enable or disable bad record logger.</td>
+</tr>
+<tr>
+<td>carbon.options.bad.records.action</td>
+<td>This property can have four types of actions for bad records FORCE, REDIRECT, IGNORE and FAIL. If set to FORCE then it auto-corrects the data by storing the bad records as NULL. If set to REDIRECT then bad records are written to the raw CSV instead of being loaded. If set to IGNORE then bad records are neither loaded nor written to the raw CSV. If set to FAIL then data loading fails if any bad records are found.</td>
+</tr>
+<tr>
+<td>carbon.options.is.empty.data.bad.record</td>
+<td>If false, then empty ("" or '' or ,,) data will not be considered as bad record and vice versa.</td>
+</tr>
+<tr>
+<td>carbon.options.sort.scope</td>
+<td>This property can have four possible values BATCH_SORT, LOCAL_SORT, GLOBAL_SORT and NO_SORT. If set to BATCH_SORT, the sorting scope is smaller and more index tree will be created,thus loading is faster but query maybe slower. If set to LOCAL_SORT, the sorting scope is bigger and one index tree per data node will be created, thus loading is slower but query is faster. If set to GLOBAL_SORT, the sorting scope is bigger and one index tree per task will be created, thus loading is slower but query is faster. If set to NO_SORT data will be loaded in unsorted manner.</td>
+</tr>
+<tr>
+<td>carbon.options.batch.sort.size.inmb</td>
+<td>Size of batch data to keep in memory, as a thumb rule it supposed to be less than 45% of sort.inmemory.size.inmb otherwise it may spill intermediate data to disk.</td>
+</tr>
+<tr>
+<td>carbon.options.single.pass</td>
+<td>Single Pass Loading enables single job to finish data loading with dictionary generation on the fly. It enhances performance in the scenarios where the subsequent data loading after initial load involves fewer incremental updates on the dictionary. This option specifies whether to use single pass for loading data or not. By default this option is set to FALSE.</td>
+</tr>
+<tr>
+<td>carbon.options.bad.record.path</td>
+<td>Specifies the HDFS path where bad records needs to be stored.</td>
+</tr>
+<tr>
+<td>carbon.options.global.sort.partitions</td>
+<td>The Number of partitions to use when shuffling data for sort. If user don't configurate or configurate it less than 1, it uses the number of map tasks as reduce tasks. In general, we recommend 2-3 tasks per CPU core in your cluster.</td>
+</tr>
+<tr>
+<td>carbon.custom.block.distribution</td>
+<td>Specifies whether to use the Spark or Carbon block distribution feature.</td>
+</tr>
+<tr>
+<td>enable.unsafe.sort</td>
+<td>Specifies whether to use unsafe sort during data loading. Unsafe sort reduces the garbage collection during data load operation, resulting in better performance.</td>
+</tr>
+</tbody>
+</table>
+<p><strong>Examples:</strong></p>
+<ul>
+<li>Add or Update:</li>
+</ul>
+<pre><code>SET enable.unsafe.sort =true
+</code></pre>
+<ul>
+<li>Display Property Value:</li>
+</ul>
+<pre><code>SET enable.unsafe.sort
+</code></pre>
+<ul>
+<li>Reset:</li>
+</ul>
+<pre><code>RESET
+</code></pre>
+<p><strong>System Response:</strong></p>
+<ul>
+<li>
+<p>Success will be recorded in the driver log.</p>
+</li>
+<li>
+<p>Failure will be displayed in the UI.</p>
+</li>
+</ul>
</div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9fffc177/content/data-management.html
----------------------------------------------------------------------
diff --git a/content/data-management.html b/content/data-management.html
index ec1d60c..1396652 100644
--- a/content/data-management.html
+++ b/content/data-management.html
@@ -298,7 +298,7 @@ The status of deleted segment is updated to Marked for delete / Marked for Updat
<p>Example :</p>
<pre><code>CLEAN FILES FOR TABLE table1
</code></pre>
-<p>This DML will physically delete the segment which are "Marked for delete" immediately.</p>
+<p>This DML will physically delete the segment which are "Marked for delete" and "Compacted" immediately.</p>
<h2>
<a id="compacting-data" class="anchor" href="#compacting-data" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Compacting Data</h2>
<ul>
@@ -344,7 +344,7 @@ run parallel with data load. There are 2 levels in minor compaction.</p>
<td>carbon.compaction.level.threshold</td>
<td>4, 3</td>
<td>Minor</td>
-<td>This property is for minor compaction which decides how many segments to be merged. Example: If it is set as 2, 3 then minor compaction will be triggered for every 2 segments. 3 is the number of level 1 compacted segment which is further compacted to new segment.</td>
+<td>This property is for minor compaction which decides how many segments to be merged. Example: If it is set as "2, 3", then minor compaction will be triggered for every 2 segments in level 1. 3 is the number of level 1 compacted segment which is further compacted to new segment in level 2.</td>
<td>NA</td>
</tr>
<tr>
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9fffc177/content/installation-guide.html
----------------------------------------------------------------------
diff --git a/content/installation-guide.html b/content/installation-guide.html
index 3bfcba2..12f0a7f 100644
--- a/content/installation-guide.html
+++ b/content/installation-guide.html
@@ -432,10 +432,11 @@ hdfs://<host_name>:port/user/hive/warehouse/carbon.store
<h3>
<a id="connecting-to-carbondata-thrift-server-using-beeline" class="anchor" href="#connecting-to-carbondata-thrift-server-using-beeline" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Connecting to CarbonData Thrift Server Using Beeline.</h3>
<pre><code> cd $SPARK_HOME
- ./bin/beeline jdbc:hive2://<thriftserver_host>:port
+ ./sbin/start-thriftserver.sh
+ ./bin/beeline -u jdbc:hive2://<thriftserver_host>:port
Example
- ./bin/beeline jdbc:hive2://10.10.10.10:10000
+ ./bin/beeline -u jdbc:hive2://10.10.10.10:10000
</code></pre>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9fffc177/content/mainpage.html
----------------------------------------------------------------------
diff --git a/content/mainpage.html b/content/mainpage.html
index f0056fe..1127f9f 100644
--- a/content/mainpage.html
+++ b/content/mainpage.html
@@ -190,6 +190,7 @@
Operations on CarbonData</a></li>
<li><a href="dml-operation-on-carbondata.html">DML
Operations on CarbonData</a></li>
+ <li><a href="partition-guide.html">Partition Table</a></li>
<li><a href="installation-guide.html">Installation Guide</a></li>
<li><a href="configuration-parameters.html">Configuring
CarbonData</a></li>
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9fffc177/content/partition-guide.html
----------------------------------------------------------------------
diff --git a/content/partition-guide.html b/content/partition-guide.html
new file mode 100644
index 0000000..a9a1f8c
--- /dev/null
+++ b/content/partition-guide.html
@@ -0,0 +1,342 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link href='images/favicon.ico' rel='shortcut icon' type='image/x-icon'>
+ <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
+ <title>CarbonData</title>
+ <style>
+
+ </style>
+ <!-- Bootstrap -->
+
+ <link rel="stylesheet" href="css/bootstrap.min.css">
+ <link href="css/style.css" rel="stylesheet">
+ <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+ <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+ <!--[if lt IE 9]>
+ <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+ <script src="https://oss.maxcdn.scom/respond/1.4.2/respond.min.js"></script>
+ <![endif]-->
+ <script src="js/jquery.min.js"></script>
+ <script src="js/bootstrap.min.js"></script>
+
+
+</head>
+<body>
+<header>
+ <nav class="navbar navbar-default navbar-custom cd-navbar-wrapper">
+ <div class="container">
+ <div class="navbar-header">
+ <button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse"
+ class="navbar-toggle collapsed" type="button">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a href="index.html" class="logo">
+ <img src="images/CarbonDataLogo.png" alt="CarbonData logo" title="CarbocnData logo"/>
+ </a>
+ </div>
+ <div class="navbar-collapse collapse cd_navcontnt" id="navbar">
+ <ul class="nav navbar-nav navbar-right navlist-custom">
+ <li><a href="index.html" class="hidden-xs"><i class="fa fa-home" aria-hidden="true"></i> </a>
+ </li>
+ <li><a href="index.html" class="hidden-lg hidden-md hidden-sm">Home</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle " data-toggle="dropdown" role="button" aria-haspopup="true"
+ aria-expanded="false"> Download <span class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li>
+ <a href="https://dist.apache.org/repos/dist/release/carbondata/1.1.1/"
+ target="_blank">Apache CarbonData 1.1.1</a></li>
+ <li>
+ <a href="https://dist.apache.org/repos/dist/release/carbondata/1.1.0/"
+ target="_blank">Apache CarbonData 1.1.0</a></li>
+ <li>
+ <a href="http://archive.apache.org/dist/incubator/carbondata/1.0.0-incubating/"
+ target="_blank">Apache CarbonData 1.0.0</a></li>
+ <li>
+ <a href="http://archive.apache.org/dist/incubator/carbondata/0.2.0-incubating/"
+ target="_blank">Apache CarbonData 0.2.0</a></li>
+ <li>
+ <a href="http://archive.apache.org/dist/incubator/carbondata/0.1.1-incubating/"
+ target="_blank">Apache CarbonData 0.1.1</a></li>
+ <li>
+ <a href="http://archive.apache.org/dist/incubator/carbondata/0.1.0-incubating/"
+ target="_blank">Apache CarbonData 0.1.0</a></li>
+ <li>
+ <a href="https://cwiki.apache.org/confluence/display/CARBONDATA/Releases"
+ target="_blank">Release Archive</a></li>
+ </ul>
+ </li>
+ <li><a href="mainpage.html" class="active">Documentation</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
+ aria-expanded="false">Community <span class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li>
+ <a href="https://github.com/apache/carbondata/blob/master/docs/How-to-contribute-to-Apache-CarbonData.md"
+ target="_blank">Contributing to CarbonData</a></li>
+ <li>
+ <a href="https://github.com/apache/carbondata/blob/master/docs/release-guide.md"
+ target="_blank">Release Guide</a></li>
+ <li>
+ <a href="https://cwiki.apache.org/confluence/display/CARBONDATA/PMC+and+Committers+member+list"
+ target="_blank">Project PMC and Committers</a></li>
+ <li>
+ <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=66850609"
+ target="_blank">CarbonData Meetups</a></li>
+ <li><a href="security.html">Apache CarbonData Security</a></li>
+ <li><a href="https://issues.apache.org/jira/browse/CARBONDATA" target="_blank">Apache
+ Jira</a></li>
+ <li><a href="videogallery.html">CarbonData Videos </a></li>
+ </ul>
+ </li>
+ <li class="dropdown">
+ <a href="http://www.apache.org/" class="apache_link hidden-xs dropdown-toggle"
+ data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Apache</a>
+ <ul class="dropdown-menu">
+ <li><a href="http://www.apache.org/" target="_blank">Apache Homepage</a></li>
+ <li><a href="http://www.apache.org/licenses/" target="_blank">License</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html"
+ target="_blank">Sponsorship</a></li>
+ <li><a href="http://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a></li>
+ </ul>
+ </li>
+
+ <li class="dropdown">
+ <a href="http://www.apache.org/" class="hidden-lg hidden-md hidden-sm dropdown-toggle"
+ data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Apache</a>
+ <ul class="dropdown-menu">
+ <li><a href="http://www.apache.org/" target="_blank">Apache Homepage</a></li>
+ <li><a href="http://www.apache.org/licenses/" target="_blank">License</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html"
+ target="_blank">Sponsorship</a></li>
+ <li><a href="http://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="#" id="search-icon"><i class="fa fa-search" aria-hidden="true"></i></a>
+
+ </li>
+
+ </ul>
+ </div><!--/.nav-collapse -->
+ <div id="search-box">
+ <form method="get" action="http://www.google.com/search" target="_blank">
+ <div class="search-block">
+ <table border="0" cellpadding="0" width="100%">
+ <tr>
+ <td style="width:80%">
+ <input type="text" name="q" size=" 5" maxlength="255" value=""
+ class="search-input" placeholder="Search...." required/>
+ </td>
+ <td style="width:20%">
+ <input type="submit" value="Search"/></td>
+ </tr>
+ <tr>
+ <td align="left" style="font-size:75%" colspan="2">
+ <input type="checkbox" name="sitesearch" value="carbondata.apache.org" checked/>
+ <span style=" position: relative; top: -3px;"> Only search for CarbonData</span>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </form>
+ </div>
+ </div>
+ </nav>
+</header> <!-- end Header part -->
+
+<div class="fixed-padding"></div> <!-- top padding with fixde header -->
+
+<section><!-- Dashboard nav -->
+ <div class="container-fluid q">
+ <div class="col-sm-12 col-md-12 maindashboard">
+ <div class="row">
+ <section>
+ <div style="padding:10px 15px;">
+ <div id="viewpage" name="viewpage">
+ <div class="row">
+ <div class="col-sm-12 col-md-12">
+ <div>
+<h1>
+<a id="carbondata-partition-table-guide" class="anchor" href="#carbondata-partition-table-guide" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>CarbonData Partition Table Guide</h1>
+<p>This tutorial is designed to provide a quick introduction to create and use partition table in Apache CarbonData.</p>
+<ul>
+<li>
+<a href="#create-partition-table">Create Partition Table</a>
+<ul>
+<li><a href="#create-hash-partition-table">Create Hash Partition Table</a></li>
+<li><a href="#create-range-partition-table">Create Range Partition Table</a></li>
+<li><a href="#create-list-partition-table">Create List Partition Table</a></li>
+</ul>
+</li>
+<li><a href="#show-partitions">Show Partitions</a></li>
+<li><a href="#maintaining-the-partitions">Maintaining the Partitions</a></li>
+<li><a href="#partition-id">Partition Id</a></li>
+<li><a href="#useful-tips">Useful Tips</a></li>
+</ul>
+<h2>
+<a id="create-partition-table" class="anchor" href="#create-partition-table" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Create Partition Table</h2>
+<h3>
+<a id="create-hash-partition-table" class="anchor" href="#create-hash-partition-table" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Create Hash Partition Table</h3>
+<pre><code> CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
+ [(col_name data_type , ...)]
+ PARTITIONED BY (partition_col_name data_type)
+ STORED BY 'carbondata'
+ [TBLPROPERTIES ('PARTITION_TYPE'='HASH',
+ 'PARTITION_NUM'='N' ...)]
+ //N is the number of hash partitions
+</code></pre>
+<p>Example:</p>
+<pre><code> create table if not exists hash_partition_table(
+ col_A String,
+ col_B Int,
+ col_C Long,
+ col_D Decimal(10,2),
+ col_F Timestamp
+ ) partitioned by (col_E Long)
+ stored by 'carbondata'
+ tblproperties('partition_type'='Hash','partition_num'='9')
+</code></pre>
+<h3>
+<a id="create-range-partition-table" class="anchor" href="#create-range-partition-table" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Create Range Partition Table</h3>
+<pre><code> CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
+ [(col_name data_type , ...)]
+ PARTITIONED BY (partition_col_name data_type)
+ STORED BY 'carbondata'
+ [TBLPROPERTIES ('PARTITION_TYPE'='RANGE',
+ 'RANGE_INFO'='2014-01-01, 2015-01-01, 2016-01-01' ...)]
+</code></pre>
+<p><strong>Note:</strong></p>
+<ul>
+<li>
+<p>The 'RANGE_INFO' must be defined in ascending order in the table properties.</p>
+</li>
+<li>
+<p>The default format for partition column of Date/Timestamp type is yyyy-MM-dd. Alternate formats for Date/Timestamp could be defined in CarbonProperties.</p>
+</li>
+</ul>
+<p>Example:</p>
+<pre><code> create table if not exists hash_partition_table(
+ col_A String,
+ col_B Int,
+ col_C Long,
+ col_D Decimal(10,2),
+ col_E Long
+ ) partitioned by (col_F Timestamp)
+ stored by 'carbondata'
+ tblproperties('partition_type'='Range',
+ 'range_info'='2015-01-01, 2016-01-01, 2017-01-01, 2017-02-01')
+</code></pre>
+<h3>
+<a id="create-list-partition-table" class="anchor" href="#create-list-partition-table" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Create List Partition Table</h3>
+<pre><code> CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
+ [(col_name data_type , ...)]
+ PARTITIONED BY (partition_col_name data_type)
+ STORED BY 'carbondata'
+ [TBLPROPERTIES ('PARTITION_TYPE'='LIST',
+ 'LIST_INFO'='A, B, C' ...)]
+</code></pre>
+<p><strong>Note :</strong></p>
+<ul>
+<li>List partition supports list info in one level group.</li>
+</ul>
+<p>Example:</p>
+<pre><code> create table if not exists hash_partition_table(
+ col_B Int,
+ col_C Long,
+ col_D Decimal(10,2),
+ col_E Long,
+ col_F Timestamp
+ ) partitioned by (col_A String)
+ stored by 'carbondata'
+ tblproperties('partition_type'='List',
+ 'list_info'='aaaa, bbbb, (cccc, dddd), eeee')
+</code></pre>
+<h2>
+<a id="show-partitions" class="anchor" href="#show-partitions" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Show Partitions</h2>
+<p>The following command is executed to get the partition information of the table</p>
+<pre><code> SHOW PARTITIONS [db_name.]table_name
+</code></pre>
+<h2>
+<a id="maintaining-the-partitions" class="anchor" href="#maintaining-the-partitions" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Maintaining the Partitions</h2>
+<h3>
+<a id="add-a-new-partition" class="anchor" href="#add-a-new-partition" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Add a new partition</h3>
+<pre><code> ALTER TABLE [db_name].table_name ADD PARTITION('new_partition')
+</code></pre>
+<h3>
+<a id="split-a-partition" class="anchor" href="#split-a-partition" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Split a partition</h3>
+<pre><code> ALTER TABLE [db_name].table_name SPLIT PARTITION(partition_id)
+ INTO('new_partition1', 'new_partition2'...)
+</code></pre>
+<h3>
+<a id="drop-a-partition" class="anchor" href="#drop-a-partition" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Drop a partition</h3>
+<pre><code> //Drop partition definition only and keep data
+ ALTER TABLE [db_name].table_name DROP PARTITION(partition_id)
+
+ //Drop both partition definition and data
+ ALTER TABLE [db_name].table_name DROP PARTITION(partition_id) WITH DATA
+</code></pre>
+<p><strong>Note</strong>:</p>
+<ul>
+<li>
+<p>In the first case where the data in the table is preserved there can be multiple scenarios as described below :</p>
+<ul>
+<li>
+<p>if the table is a range partition table, data will be merged into the next partition, and if the dropped partition is the last partition, then data will be merged into the default partition.</p>
+</li>
+<li>
+<p>if the table is a list partition table, data will be merged into default partition.</p>
+</li>
+</ul>
+</li>
+<li>
+<p>Dropping the default partition is not allowed, but DELETE statement can be used to delete data in default partition.</p>
+</li>
+<li>
+<p>The partition_id could be fetched using the <a href="#show-partitions">SHOW PARTITIONS</a> command.</p>
+</li>
+<li>
+<p>Hash partition table is not supported for ADD, SPLIT and DROP commands.</p>
+</li>
+</ul>
+<h2>
+<a id="partition-id" class="anchor" href="#partition-id" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Partition Id</h2>
+<p>In CarbonData like the hive, folders are not used to divide partitions instead partition id is used to replace the task id. It could make use of the characteristic and meanwhile reduce some metadata.</p>
+<pre><code>SegmentDir/0_batchno0-0-1502703086921.carbonindex
+ ^
+SegmentDir/part-0-0_batchno0-0-1502703086921.carbondata
+ ^
+</code></pre>
+<h2>
+<a id="useful-tips" class="anchor" href="#useful-tips" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Useful Tips</h2>
+<p>Here are some useful tips to improve query performance of carbonData partition table:</p>
+<p><strong>Prior analysis of proper partition column</strong></p>
+<p>The distribution of data based on some random column could be skewed, building a skewed partition table is meaningless. Some basic statistical analysis before the creation of partition table can avoid an extremely skewed column.</p>
+<p><strong>Exclude partition column from sort columns</strong></p>
+<p>If you have many dimensions, that need to be sorted then one must exclude column present in the partition from sort columns, this will allow another dimension to do the efficient sorting.</p>
+<p><strong>Remember to add filter on partition column when writing SQL</strong></p>
+<p>When writing SQL on a partition table, try to use filters on the partition column.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="doc-footer">
+ <a href="#top" class="scroll-top">Top</a>
+</div>
+</div>
+</section>
+</div>
+</div>
+</div>
+</section><!-- End systemblock part -->
+<script src="js/custom.js"></script>
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/carbondata-site/blob/9fffc177/content/pdf/maven-pdf-plugin.pdf
----------------------------------------------------------------------
diff --git a/content/pdf/maven-pdf-plugin.pdf b/content/pdf/maven-pdf-plugin.pdf
index 170d4d6..e45d97d 100644
Binary files a/content/pdf/maven-pdf-plugin.pdf and b/content/pdf/maven-pdf-plugin.pdf differ
[2/3] carbondata-site git commit: Added link for partition table
guide and updated the conf
Posted by ch...@apache.org.
Added link for partition table guide and updated the conf
Project: http://git-wip-us.apache.org/repos/asf/carbondata-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata-site/commit/5a7d4dc4
Tree: http://git-wip-us.apache.org/repos/asf/carbondata-site/tree/5a7d4dc4
Diff: http://git-wip-us.apache.org/repos/asf/carbondata-site/diff/5a7d4dc4
Branch: refs/heads/asf-site
Commit: 5a7d4dc4615553e87fc3e4ad3bca6e36d42e83ef
Parents: 87359ad b226d16
Author: chenliang613 <ch...@apache.org>
Authored: Fri Sep 29 09:54:09 2017 +0800
Committer: chenliang613 <ch...@apache.org>
Committed: Fri Sep 29 09:54:09 2017 +0800
----------------------------------------------------------------------
src/main/resources/application.conf | 3 +-
src/main/webapp/configuration-parameters.html | 138 ++++++++-
src/main/webapp/data-management.html | 4 +-
src/main/webapp/installation-guide.html | 5 +-
src/main/webapp/mainpage.html | 1 +
src/main/webapp/partition-guide.html | 342 +++++++++++++++++++++
src/main/webapp/pdf/maven-pdf-plugin.pdf | Bin 235235 -> 248692 bytes
src/site/pdf.xml | 1 +
8 files changed, 477 insertions(+), 17 deletions(-)
----------------------------------------------------------------------