carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [11/50] [abbrv] incubator-carbondata git commit: [CARBONDATA-624] Complete CarbonData document in md files
Date Fri, 20 Jan 2017 17:39:19 GMT
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/dml-operation-on-carbondata.md
----------------------------------------------------------------------
diff --git a/docs/dml-operation-on-carbondata.md b/docs/dml-operation-on-carbondata.md
new file mode 100644
index 0000000..0523d95
--- /dev/null
+++ b/docs/dml-operation-on-carbondata.md
@@ -0,0 +1,429 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# DML Operations on CarbonData
+This tutorial guides you through the data manipulation language support provided by CarbonData.
+
+## Overview 
+The following DML operations are supported in CarbonData :
+
+* [LOAD DATA](#load-data)
+* [INSERT DATA INTO A CARBONDATA TABLE](#insert-data-into-a-carbondata-table)
+* [SHOW SEGMENTS](#show-segments)
+* [DELETE SEGMENT BY ID](#delete-segment-by-id)
+* [DELETE SEGMENT BY DATE](#delete-segment-by-date)
+* [UPDATE CARBONDATA TABLE](#update-carbondata-table)
+* [DELETE RECORDS FROM CARBONDATA TABLE](#delete-records-from-carbondata-table)
+
+## LOAD DATA
+
+This command loads the user data in raw format to the CarbonData specific data format store, this allows CarbonData to provide good performance while querying the data.
+Please visit [Data Management](data-management.md) for more details on LOAD.
+
+### Syntax
+
+```
+LOAD DATA [LOCAL] INPATH 'folder_path' 
+INTO TABLE [db_name.]table_name 
+OPTIONS(property_name=property_value, ...)
+```
+
+OPTIONS are not mandatory for data loading process. Inside OPTIONS user can provide either of any options like DELIMITER, QUOTECHAR, ESCAPECHAR, MULTILINE as per requirement.
+
+NOTE: The path shall be canonical path.
+
+### Parameter Description
+
+| Parameter     | Description                                                          | Optional |
+| ------------- | ---------------------------------------------------------------------| -------- |
+| folder_path   | Path of raw csv data folder or file.                                 | NO       |
+| db_name       | Database name, if it is not specified then it uses the current database. | YES      |
+| table_name    | The name of the table in provided database.                          | NO       |
+| OPTIONS       | Extra options provided to Load                                       | YES      |
+ 
+
+### Usage Guidelines
+
+You can use the following options to load data:
+
+- **DELIMITER:** Delimiters can be provided in the load command.
+    
+    ``` 
+    OPTIONS('DELIMITER'=',')
+    ```
+
+- **QUOTECHAR:** Quote Characters can be provided in the load command.
+
+    ```
+    OPTIONS('QUOTECHAR'='"')
+    ```
+
+- **COMMENTCHAR:** Comment Characters can be provided in the load command if user want to comment lines.
+
+    ```
+    OPTIONS('COMMENTCHAR'='#')
+    ```
+
+- **FILEHEADER:** Headers can be provided in the LOAD DATA command if headers are missing in the source files.
+
+    ```
+    OPTIONS('FILEHEADER'='column1,column2') 
+    ```
+
+- **MULTILINE:** CSV with new line character in quotes.
+
+    ```
+    OPTIONS('MULTILINE'='true') 
+    ```
+
+- **ESCAPECHAR:** Escape char can be provided if user want strict validation of escape character on CSV.
+
+    ```
+    OPTIONS('ESCAPECHAR'='\') 
+    ```
+
+- **COMPLEX_DELIMITER_LEVEL_1:** Split the complex type data column in a row (eg., a$b$c --> Array = {a,b,c}).
+
+    ```
+    OPTIONS('COMPLEX_DELIMITER_LEVEL_1'='$') 
+    ```
+
+- **COMPLEX_DELIMITER_LEVEL_2:** Split the complex type nested data column in a row. Applies level_1 delimiter & applies level_2 based on complex data type (eg., a:b$c:d --> Array> = {{a,b},{c,d}}).
+
+    ```
+    OPTIONS('COMPLEX_DELIMITER_LEVEL_2'=':') 
+    ```
+
+- **ALL_DICTIONARY_PATH:** All dictionary files path.
+
+    ```
+    OPTIONS('ALL_DICTIONARY_PATH'='/opt/alldictionary/data.dictionary')
+    ```
+
+- **COLUMNDICT:** Dictionary file path for specified column.
+
+    ```
+    OPTIONS('COLUMNDICT'='column1:dictionaryFilePath1,
+    column2:dictionaryFilePath2')
+    ```
+
+    NOTE: ALL_DICTIONARY_PATH and COLUMNDICT can't be used together.
+    
+- **DATEFORMAT:** Date format for specified column.
+
+    ```
+    OPTIONS('DATEFORMAT'='column1:dateFormat1, column2:dateFormat2')
+    ```
+
+    NOTE: Date formats are specified by date pattern strings. The date pattern letters in CarbonData are same as in JAVA. Refer to [SimpleDateFormat](http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html).
+
+
+### Example:
+
+```
+LOAD DATA local inpath '/opt/rawdata/data.csv' INTO table carbontable
+options('DELIMITER'=',', 'QUOTECHAR'='"','COMMENTCHAR'='#',
+'FILEHEADER'='empno,empname,designation,doj,workgroupcategory,
+ workgroupcategoryname,deptno,deptname,projectcode,
+ projectjoindate,projectenddate,attendance,utilization,salary',
+'MULTILINE'='true','ESCAPECHAR'='\','COMPLEX_DELIMITER_LEVEL_1'='$', 
+'COMPLEX_DELIMITER_LEVEL_2'=':',
+'ALL_DICTIONARY_PATH'='/opt/alldictionary/data.dictionary'
+)
+```
+
+
+## INSERT DATA INTO A CARBONDATA TABLE
+
+This command inserts data into a CarbonData table. It is defined as a combination of two queries Insert and Select query respectively. It inserts records from a source table into a target CarbonData table. The source table can be a Hive table, Parquet table or a CarbonData table itself. It comes with the functionality to aggregate the records of a table by performing Select query on source table and load its corresponding resultant records into a CarbonData table.
+
+**NOTE** :  The client node where the INSERT command is executing, must be part of the cluster.
+
+### Syntax
+
+```
+INSERT INTO TABLE <CARBONDATA TABLE> SELECT * FROM sourceTableName 
+[ WHERE { <filter_condition> } ];
+```
+
+You can also omit the `table` keyword and write your query as:
+ 
+```
+INSERT INTO <CARBONDATA TABLE> SELECT * FROM sourceTableName 
+[ WHERE { <filter_condition> } ];
+```
+
+### Parameter Description
+
+| Parameter | Description |
+|--------------|---------------------------------------------------------------------------------|
+| CARBON TABLE | The name of the Carbon table in which you want to perform the insert operation. |
+| sourceTableName | The table from which the records are read and inserted into destination CarbonData table. |
+
+### Usage Guidelines
+The following condition must be met for successful insert operation :
+
+- The source table and the CarbonData table must have the same table schema.
+- The table must be created.
+- Overwrite is not supported for CarbonData table.
+- The data type of source and destination table columns should be same, else the data from source table will be treated as bad records and the INSERT command fails.
+- INSERT INTO command does not support partial success if bad records are found, it will fail.
+- Data cannot be loaded or updated in source table while insert from source table to target table is in progress.
+
+To enable data load or update during insert operation, configure the following property to true.
+
+```
+carbon.insert.persist.enable=true
+```
+
+By default the above configuration will be false.
+
+**NOTE**: Enabling this property will reduce the performance.
+
+### Examples
+```
+INSERT INTO table1 SELECT item1 ,sum(item2 + 1000) as result FROM 
+table2 group by item1;
+```
+
+```
+INSERT INTO table1 SELECT item1, item2, item3 FROM table2 
+where item2='xyz';
+```
+
+```
+INSERT INTO table1 SELECT * FROM table2 
+where exists (select * from table3 
+where table2.item1 = table3.item1);
+```
+
+**The Status Success/Failure shall be captured in the driver log.**
+
+## SHOW SEGMENTS
+
+This command is used to get the segments of CarbonData table.
+
+```
+SHOW SEGMENTS FOR TABLE [db_name.]table_name 
+LIMIT number_of_segments;
+```
+
+### Parameter Description
+
+| Parameter          | Description                                                          | Optional |
+| ------------------ | ---------------------------------------------------------------------| ---------|
+| db_name            | Database name, if it is not specified then it uses the current database. | YES      |
+| table_name         | The name of the table in provided database.                          | NO       |
+| number_of_segments | Limit the output to this number.                                     | YES      |
+
+### Example:
+
+```
+SHOW SEGMENTS FOR TABLE CarbonDatabase.CarbonTable LIMIT 4;
+```
+
+## DELETE SEGMENT BY ID
+
+This command is used to delete segment by using the segment ID. Each segment has a unique segment ID associated with it. 
+Using this segment ID, you can remove the segment.
+
+The following command will get the segmentID.
+
+```
+SHOW SEGMENTS FOR Table dbname.tablename LIMIT number_of_segments
+```
+
+After you retrieve the segment ID of the segment that you want to delete, execute the following command to delete the selected segment.
+
+```
+DELETE SEGMENT segment_sequence_id1, segments_sequence_id2, .... 
+FROM TABLE tableName
+```
+
+### Parameter Description
+| Parameter  | Description                                                          | Optional |
+| -----------| ---------------------------------------------------------------------|----------|
+| segment_id | Segment Id of the load.                                              | NO       |
+| db_name    | Database name, if it is not specified then it uses the current database. | YES      |
+| table_name | The name of the table in provided database.                          | NO       |
+
+### Example:
+
+```
+DELETE SEGMENT 0 FROM TABLE CarbonDatabase.CarbonTable;
+DELETE SEGMENT 0.1,5,8 FROM TABLE CarbonDatabase.CarbonTable;
+```
+  NOTE: Here 0.1 is compacted segment sequence id. 
+
+## DELETE SEGMENT BY DATE
+
+This command will allow to delete the CarbonData segment(s) from the store based on the date provided by the user in the DML command. 
+The segment created before the particular date will be removed from the specific stores.
+
+```
+DELETE FROM TABLE [schema_name.]table_name 
+WHERE[DATE_FIELD]BEFORE [DATE_VALUE]
+```
+
+### Parameter Description
+
+| Parameter  | Description                                                                                        | Optional |
+| ---------- | ---------------------------------------------------------------------------------------------------| -------- |
+| DATE_VALUE | Valid segment load start time value. All the segments before this specified date will be deleted. | NO       |
+| db_name    | Database name, if it is not specified then it uses the current database.                               | YES      |
+| table_name | The name of the table in provided database.                                                        | NO       |
+
+### Example:
+
+```
+ DELETE SEGMENTS FROM TABLE CarbonDatabase.CarbonTable 
+ WHERE STARTTIME BEFORE '2017-06-01 12:05:06';  
+```
+
+## Update CarbonData Table
+This command will allow to update the carbon table based on the column expression and optional filter conditions.
+
+### Syntax
+
+```
+ UPDATE <table_name>
+ SET (column_name1, column_name2, ... column_name n) =
+ (column1_expression , column2_expression . .. column n_expression )
+ [ WHERE { <filter_condition> } ];
+```
+
+alternatively the following the command can also be used for updating the CarbonData Table :
+
+```
+UPDATE <table_name>
+SET (column_name1, column_name2,) =
+(select sourceColumn1, sourceColumn2 from sourceTable
+[ WHERE { <filter_condition> } ] )
+[ WHERE { <filter_condition> } ];
+```
+
+### Parameter Description
+
+| Parameter | Description |
+|--------------|---------------------------------------------------------------------------------|
+| table_name | The name of the Carbon table in which you want to perform the update operation. |
+| column_name | The destination columns to be updated. |
+| sourceColumn | The source table column values to be updated in destination table. |
+| sourceTable | The table from which the records are updated into destination Carbon table. |
+
+### Usage Guidelines
+The following conditions must be met for successful updation :
+
+- The update command fails if multiple input rows in source table are matched with single row in destination table.
+- If the source table generates empty records, the update operation will complete successfully without updating the table.
+- If a source table row does not correspond to any of the existing rows in a destination table, the update operation will complete successfully without updating the table.
+- In sub-query, if the source table and the target table are same, then the update operation fails.
+- If the sub-query used in UPDATE statement contains aggregate method or group by query, then the UPDATE operation fails.
+
+### Examples
+
+ Update is not supported for queries that contain aggregate or group by.
+
+```
+ UPDATE t_carbn01 a
+ SET (a.item_type_code, a.profit) = ( SELECT b.item_type_cd,
+ sum(b.profit) from t_carbn01b b
+ WHERE item_type_cd =2 group by item_type_code);
+```
+
+Here the Update Operation fails as the query contains aggregate function sum(b.profit) and group by clause in the sub-query.
+
+
+```
+UPDATE carbonTable1 d
+SET(d.column3,d.column5 ) = (SELECT s.c33 ,s.c55
+FROM sourceTable1 s WHERE d.column1 = s.c11)
+WHERE d.column1 = 'china' EXISTS( SELECT * from table3 o where o.c2 > 1);
+```
+
+
+```
+UPDATE carbonTable1 d SET (c3) = (SELECT s.c33 from sourceTable1 s
+WHERE d.column1 = s.c11)
+WHERE exists( select * from iud.other o where o.c2 > 1);
+```
+
+
+```
+UPDATE carbonTable1 SET (c2, c5 ) = (c2 + 1, concat(c5 , "y" ));
+```
+
+
+```
+UPDATE carbonTable1 d SET (c2, c5 ) = (c2 + 1, "xyx")
+WHERE d.column1 = 'india';
+```
+
+
+```
+UPDATE carbonTable1 d SET (c2, c5 ) = (c2 + 1, "xyx")
+WHERE d.column1 = 'india'
+and EXISTS( SELECT * FROM table3 o WHERE o.column2 > 1);
+```
+
+**The Status Success/Failure shall be captured in the driver log and the client.**
+
+
+## Delete Records from CarbonData Table
+This command allows us to delete records from CarbonData table.
+
+### Syntax
+
+```
+DELETE FROM table_name [WHERE expression];
+```
+
+### Parameter Description
+
+| Parameter | Description |
+|--------------|-----------------------------------------------------------------------|
+| table_name | The name of the Carbon table in which you want to perform the delete. |
+
+
+### Examples
+
+```
+DELETE FROM columncarbonTable1 d WHERE d.column1  = 'china';
+```
+
+```
+DELETE FROM dest WHERE column1 IN ('china', 'USA');
+```
+
+```
+DELETE FROM columncarbonTable1
+WHERE column1 IN (SELECT column11 FROM sourceTable2);
+```
+
+```
+DELETE FROM columncarbonTable1
+WHERE column1 IN (SELECT column11 FROM sourceTable2 WHERE
+column1 = 'USA');
+```
+
+```
+DELETE FROM columncarbonTable1 WHERE column2 >= 4
+```
+
+**The Status Success/Failure shall be captured in the driver log and the client.**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/faq.md
----------------------------------------------------------------------
diff --git a/docs/faq.md b/docs/faq.md
new file mode 100644
index 0000000..a72a96f
--- /dev/null
+++ b/docs/faq.md
@@ -0,0 +1,47 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# FAQs
+* **Auto Compaction not Working**
+
+    The Property carbon.enable.auto.load.merge in carbon.properties need to be set to true.
+
+* **Getting Abstract method error**
+
+    You need to specify the spark version while using Maven to build project.
+
+* **Getting NotImplementedException for subquery using IN and EXISTS**
+
+    Subquery with in and exists not supported in CarbonData.
+    
+* **Getting Exceptions on creating  a view**
+    
+    View not supported in CarbonData.
+    
+* **How to verify if ColumnGroups have been created as desired.**
+
+    Try using desc table query.
+    
+* **Did anyone try to run CarbonData on windows? Is it supported on Windows?**
+    
+    We may provide support for windows in future. You are welcome to contribute if you want to add the support :) 
+   
+    
+    
+

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/CarbonData_logo.png
----------------------------------------------------------------------
diff --git a/docs/images/CarbonData_logo.png b/docs/images/CarbonData_logo.png
new file mode 100644
index 0000000..bc09b23
Binary files /dev/null and b/docs/images/CarbonData_logo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/carbon_data_file_structure_new.png
----------------------------------------------------------------------
diff --git a/docs/images/carbon_data_file_structure_new.png b/docs/images/carbon_data_file_structure_new.png
new file mode 100644
index 0000000..3f9241b
Binary files /dev/null and b/docs/images/carbon_data_file_structure_new.png differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/carbon_data_format_new.png
----------------------------------------------------------------------
diff --git a/docs/images/carbon_data_format_new.png b/docs/images/carbon_data_format_new.png
new file mode 100644
index 0000000..9d0b194
Binary files /dev/null and b/docs/images/carbon_data_format_new.png differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/carbon_data_full_scan.png
----------------------------------------------------------------------
diff --git a/docs/images/carbon_data_full_scan.png b/docs/images/carbon_data_full_scan.png
new file mode 100644
index 0000000..46715e7
Binary files /dev/null and b/docs/images/carbon_data_full_scan.png differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/carbon_data_motivation.png
----------------------------------------------------------------------
diff --git a/docs/images/carbon_data_motivation.png b/docs/images/carbon_data_motivation.png
new file mode 100644
index 0000000..6e454c6
Binary files /dev/null and b/docs/images/carbon_data_motivation.png differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/carbon_data_olap_scan.png
----------------------------------------------------------------------
diff --git a/docs/images/carbon_data_olap_scan.png b/docs/images/carbon_data_olap_scan.png
new file mode 100644
index 0000000..c1dfb18
Binary files /dev/null and b/docs/images/carbon_data_olap_scan.png differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/carbon_data_random_scan.png
----------------------------------------------------------------------
diff --git a/docs/images/carbon_data_random_scan.png b/docs/images/carbon_data_random_scan.png
new file mode 100644
index 0000000..7d44d34
Binary files /dev/null and b/docs/images/carbon_data_random_scan.png differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/format/CarbonData_logo.png
----------------------------------------------------------------------
diff --git a/docs/images/format/CarbonData_logo.png b/docs/images/format/CarbonData_logo.png
deleted file mode 100644
index bc09b23..0000000
Binary files a/docs/images/format/CarbonData_logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/format/carbon_data_file_structure_new.png
----------------------------------------------------------------------
diff --git a/docs/images/format/carbon_data_file_structure_new.png b/docs/images/format/carbon_data_file_structure_new.png
deleted file mode 100644
index 3f9241b..0000000
Binary files a/docs/images/format/carbon_data_file_structure_new.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/format/carbon_data_format_new.png
----------------------------------------------------------------------
diff --git a/docs/images/format/carbon_data_format_new.png b/docs/images/format/carbon_data_format_new.png
deleted file mode 100644
index 9d0b194..0000000
Binary files a/docs/images/format/carbon_data_format_new.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/format/carbon_data_full_scan.png
----------------------------------------------------------------------
diff --git a/docs/images/format/carbon_data_full_scan.png b/docs/images/format/carbon_data_full_scan.png
deleted file mode 100644
index 46715e7..0000000
Binary files a/docs/images/format/carbon_data_full_scan.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/format/carbon_data_motivation.png
----------------------------------------------------------------------
diff --git a/docs/images/format/carbon_data_motivation.png b/docs/images/format/carbon_data_motivation.png
deleted file mode 100644
index 6e454c6..0000000
Binary files a/docs/images/format/carbon_data_motivation.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/format/carbon_data_olap_scan.png
----------------------------------------------------------------------
diff --git a/docs/images/format/carbon_data_olap_scan.png b/docs/images/format/carbon_data_olap_scan.png
deleted file mode 100644
index c1dfb18..0000000
Binary files a/docs/images/format/carbon_data_olap_scan.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/images/format/carbon_data_random_scan.png
----------------------------------------------------------------------
diff --git a/docs/images/format/carbon_data_random_scan.png b/docs/images/format/carbon_data_random_scan.png
deleted file mode 100644
index 7d44d34..0000000
Binary files a/docs/images/format/carbon_data_random_scan.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/installation-guide.md
----------------------------------------------------------------------
diff --git a/docs/installation-guide.md b/docs/installation-guide.md
new file mode 100644
index 0000000..7c1f7eb
--- /dev/null
+++ b/docs/installation-guide.md
@@ -0,0 +1,187 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# Installation Guide
+This tutorial guides you through the installation and configuration of CarbonData in the following two modes :
+
+* [Installing and Configuring CarbonData on Standalone Spark Cluster](#installing-and-configuring-carbondata-on-standalone-spark-cluster)
+* [Installing and Configuring CarbonData on “Spark on YARN” Cluster](#installing-and-configuring-carbondata-on-spark-on-yarn-cluster)
+
+followed by :
+
+* [Query Execution using CarbonData Thrift Server](#query-execution-using-carbondata-thrift-server)
+
+## Installing and Configuring CarbonData on Standalone Spark Cluster
+
+### Prerequisites
+
+   - Hadoop HDFS and Yarn should be installed and running.
+
+   - Spark should be installed and running on all the cluster nodes.
+
+   - CarbonData user should have permission to access HDFS.
+
+
+### Procedure
+
+* [Build the CarbonData](https://cwiki.apache.org/confluence/display/CARBONDATA/Building+CarbonData+And+IDE+Configuration) project and get the assembly jar from "./assembly/target/scala-2.10/carbondata_xxx.jar" and put in the ``"<SPARK_HOME>/carbonlib"`` folder.
+
+     NOTE: Create the carbonlib folder if it does not exists inside ``"<SPARK_HOME>"`` path.
+
+* Add the carbonlib folder path in the Spark classpath. (Edit ``"<SPARK_HOME>/conf/spark-env.sh"`` file and modify the value of SPARK_CLASSPATH by appending ``"<SPARK_HOME>/carbonlib/*"`` to the existing value)
+
+* Copy the carbon.properties.template to ``"<SPARK_HOME>/conf/carbon.properties"`` folder from "./conf/" of CarbonData repository.
+
+* Copy the "carbonplugins" folder  to ``"<SPARK_HOME>/carbonlib"`` folder from "./processing/" folder of CarbonData repository.
+
+    NOTE: carbonplugins will contain .kettle folder.
+    
+* In Spark node, configure the properties mentioned in the following table in ``"<SPARK_HOME>/conf/spark-defaults.conf"`` file.
+  
+| Property | Description | Value |
+|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|
+| carbon.kettle.home | Path that will be used by CarbonData internally to create graph for loading the data | $SPARK_HOME /carbonlib/carbonplugins |
+| spark.driver.extraJavaOptions | A string of extra JVM options to pass to the driver. For instance, GC settings or other logging. | -Dcarbon.properties.filepath=$SPARK_HOME/conf/carbon.properties |
+| spark.executor.extraJavaOptions | A string of extra JVM options to pass to executors. For instance, GC settings or other logging. NOTE: You can enter multiple values separated by space. | -Dcarbon.properties.filepath=$SPARK_HOME/conf/carbon.properties |
+
+  
+* Add the following properties in ``"<SPARK_HOME>/conf/" carbon.properties``:
+
+| Property             | Required | Description                                                                            | Example                             | Remark  |
+|----------------------|----------|----------------------------------------------------------------------------------------|-------------------------------------|---------|
+| carbon.storelocation | NO       | Location where data CarbonData will create the store and write the data in its own format. | hdfs://HOSTNAME:PORT/Opt/CarbonStore      | Propose to set HDFS directory |
+| carbon.kettle.home   | YES      | Path that will be used by CarbonData internally to create graph for loading the data.         | $SPARK_HOME/carbonlib/carbonplugins |         |
+
+
+* Verify the installation. For example:
+
+```
+   ./spark-shell --master spark://HOSTNAME:PORT --total-executor-cores 2
+   --executor-memory 2G
+```
+
+NOTE: Make sure you have permissions for CarbonData JARs and files through which driver and executor will start.
+
+To get started with CarbonData : [Quick Start](quick-start-guide.md) , [DDL Operations on CarbonData](ddl-operation-on-carbondata.md)
+
+## Installing and Configuring CarbonData on "Spark on YARN" Cluster
+
+   This section provides the procedure to install CarbonData on "Spark on YARN" cluster.
+
+### Prerequisites
+   * Hadoop HDFS and Yarn should be installed and running.
+   * Spark should be installed and running in all the clients.
+   * CarbonData user should have permission to access HDFS.
+
+### Procedure
+
+   The following steps are only for Driver Nodes. (Driver nodes are the one which starts the spark context.)
+
+* [Build the CarbonData](https://cwiki.apache.org/confluence/display/CARBONDATA/Building+CarbonData+And+IDE+Configuration) project and get the assembly jar from "./assembly/target/scala-2.10/carbondata_xxx.jar" and put in the ``"<SPARK_HOME>/carbonlib"`` folder.
+
+      NOTE: Create the carbonlib folder if it does not exists inside ``"<SPARK_HOME>"`` path.
+
+* Copy "carbonplugins" folder to ``"<SPARK_HOME>/carbonlib"`` folder from "./processing/" folder of CarbonData repository.
+      carbonplugins will contain .kettle folder.
+
+* Copy the "carbon.properties.template" to ``"<SPARK_HOME>/conf/carbon.properties"`` folder from conf folder of CarbonData repository.
+* Modify the parameters in "spark-default.conf" located in the ``"<SPARK_HOME>/conf``"
+
+| Property | Description | Value |
+|---------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|
+| spark.master | Set this value to run the Spark in yarn cluster mode. | Set "yarn-client" to run the Spark in yarn cluster mode. |
+| spark.yarn.dist.files | Comma-separated list of files to be placed in the working directory of each executor. |``"<YOUR_SPARK_HOME_PATH>"/conf/carbon.properties`` |
+| spark.yarn.dist.archives | Comma-separated list of archives to be extracted into the working directory of each executor. |``"<YOUR_SPARK_HOME_PATH>"/carbonlib/carbondata_xxx.jar`` |
+| spark.executor.extraJavaOptions | A string of extra JVM options to pass to executors. For instance  NOTE: You can enter multiple values separated by space. |``-Dcarbon.properties.filepath="<YOUR_SPARK_HOME_PATH>"/conf/carbon.properties`` |
+| spark.executor.extraClassPath | Extra classpath entries to prepend to the classpath of executors. NOTE: If SPARK_CLASSPATH is defined in spark-env.sh, then comment it and append the values in below parameter spark.driver.extraClassPath |``"<YOUR_SPARK_HOME_PATH>"/carbonlib/carbonlib/carbondata_xxx.jar`` |
+| spark.driver.extraClassPath | Extra classpath entries to prepend to the classpath of the driver. NOTE: If SPARK_CLASSPATH is defined in spark-env.sh, then comment it and append the value in below parameter spark.driver.extraClassPath. |``"<YOUR_SPARK_HOME_PATH>"/carbonlib/carbonlib/carbondata_xxx.jar`` |
+| spark.driver.extraJavaOptions | A string of extra JVM options to pass to the driver. For instance, GC settings or other logging. |``-Dcarbon.properties.filepath="<YOUR_SPARK_HOME_PATH>"/conf/carbon.properties`` |
+| carbon.kettle.home | Path that will be used by CarbonData internally to create graph for loading the data. |``"<YOUR_SPARK_HOME_PATH>"/carbonlib/carbonplugins`` |
+
+* Add the following properties in ``<SPARK_HOME>/conf/ carbon.properties``:
+
+| Property | Required | Description | Example | Default Value |
+|----------------------|----------|----------------------------------------------------------------------------------------|-------------------------------------|---------------|
+| carbon.storelocation | NO | Location where CarbonData will create the store and write the data in its own format. | hdfs://HOSTNAME:PORT/Opt/CarbonStore | Propose to set HDFS directory|
+| carbon.kettle.home | YES | Path that will be used by CarbonData internally to create graph for loading the data. | $SPARK_HOME/carbonlib/carbonplugins |  |
+
+
+* Verify the installation.
+   
+```
+     ./bin/spark-shell --master yarn-client --driver-memory 1g 
+     --executor-cores 2 --executor-memory 2G
+```
+  NOTE: Make sure you have permissions for CarbonData JARs and files through which driver and executor will start.
+
+  Getting started with CarbonData : [Quick Start](quick-start-guide.md) , [DDL Operations on CarbonData](ddl-operation-on-carbondata.md)
+
+## Query Execution Using CarbonData Thrift Server
+
+### Starting CarbonData Thrift Server
+
+   a. cd ``<SPARK_HOME>``
+
+   b. Run the following command to start the CarbonData thrift server.
+     
+```
+./bin/spark-submit --conf spark.sql.hive.thriftServer.singleSession=true 
+--class org.apache.carbondata.spark.thriftserver.CarbonThriftServer
+$SPARK_HOME/carbonlib/$CARBON_ASSEMBLY_JAR <carbon_store_path>
+```
+  
+| Parameter | Description | Example |
+|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
+| CARBON_ASSEMBLY_JAR | CarbonData assembly jar name present in the ``"<SPARK_HOME>"/carbonlib/`` folder. | carbondata_2.10-0.1.0-incubating-SNAPSHOT-shade-hadoop2.7.2.jar |
+| carbon_store_path | This is a parameter to the CarbonThriftServer class. This a HDFS path where CarbonData files will be kept. Strongly Recommended to put same as carbon.storelocation parameter of carbon.properties. | hdfs//<host_name>:54310/user/hive/warehouse/carbon.store |
+
+### Examples
+   
+   * Start with default memory and executors
+
+```
+./bin/spark-submit --conf spark.sql.hive.thriftServer.singleSession=true 
+--class org.apache.carbondata.spark.thriftserver.CarbonThriftServer 
+$SPARK_HOME/carbonlib
+/carbondata_2.10-0.1.0-incubating-SNAPSHOT-shade-hadoop2.7.2.jar 
+hdfs://hacluster/user/hive/warehouse/carbon.store
+```
+   
+   * Start with Fixed executors and resources
+
+```
+./bin/spark-submit --conf spark.sql.hive.thriftServer.singleSession=true 
+--class org.apache.carbondata.spark.thriftserver.CarbonThriftServer 
+--num-executors 3 --driver-memory 20g --executor-memory 250g 
+--executor-cores 32 
+/srv/OSCON/BigData/HACluster/install/spark/sparkJdbc/lib
+/carbondata_2.10-0.1.0-incubating-SNAPSHOT-shade-hadoop2.7.2.jar 
+hdfs://hacluster/user/hive/warehouse/carbon.store
+```
+  
+### Connecting to CarbonData Thrift Server Using Beeline
+
+```
+     cd <SPARK_HOME>
+     ./bin/beeline jdbc:hive2://<thrftserver_host>:port
+
+     Example
+     ./bin/beeline jdbc:hive2://10.10.10.10:10000
+```
+

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/overview-of-carbondata.md
----------------------------------------------------------------------
diff --git a/docs/overview-of-carbondata.md b/docs/overview-of-carbondata.md
new file mode 100644
index 0000000..5e983cb
--- /dev/null
+++ b/docs/overview-of-carbondata.md
@@ -0,0 +1,178 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+# Overview
+This tutorial provides a detailed overview about :
+
+* [Introduction](#introduction)
+* [CarbonData File Structure](#carbondata-file-structure)
+* [Features](#features)
+* [Data Types](#data-types)
+* [Interfaces](#interfaces)
+
+##  Introduction
+
+CarbonData is a fully indexed columnar and Hadoop native data-store for processing heavy analytical workloads and detailed queries on big data. CarbonData allows  faster interactive query using advanced columnar storage, index, compression and encoding techniques to improve computing efficiency, which helps in speeding up queries by an order of magnitude faster over PetaBytes of data.
+
+In customer benchmarks, CarbonData has proven to manage Petabyte of data running on extraordinarily low-cost hardware and answers queries around 10 times faster than the current open source solutions (column-oriented SQL on Hadoop data-stores).
+
+Some of the salient features of CarbonData are :
+
+* Low-Latency for various types of data access patterns like Sequential, Random and OLAP.
+* Fast query on fast data.
+* Space efficiency.
+* General format available on Hadoop-ecosystem.
+
+##  CarbonData File Structure
+
+CarbonData files contain groups of data called blocklets, along with all required information like schema, offsets and indices etc, in a file footer, co-located in HDFS.
+
+The file footer can be read once to build the indices in memory, which can be utilized for optimizing the scans and processing for all subsequent queries.
+
+Each blocklet in the file is further divided into chunks of data called data chunks. Each data chunk is organized either in columnar format or row format, and stores the data of either a single column or a set of columns. All blocklets in a file contain the same number and type of data chunks.
+
+![CarbonData File Structure](../../../src/site/markdown/images/carbon_data_file_structure_new.png?raw=true)
+
+Each data chunk contains multiple groups of data called as pages. There are three types of pages.
+
+* Data Page: Contains the encoded data of a column/group of columns.
+* Row ID Page (optional): Contains the row ID mappings used when the data page is stored as an inverted index.
+* RLE Page (optional): Contains additional metadata used when the data page is RLE coded.
+
+![CarbonData File Format](../../../src/site/markdown/images/carbon_data_format_new.png?raw=true)
+
+##  Features
+
+CarbonData file format is a columnar store in HDFS. It has many features that a modern columnar format has, such as splittable, compression schema, complex data type etc and CarbonData has following unique features:
+
+* Unique Data Organization: Though CarbonData stores data in Columnar format, it differs from traditional Columnar formats as the columns in each row-group(Data Block) is sorted independent of the other columns. Though this arrangement requires CarbonData to store the row-number mapping against each column value, it makes it possible to use binary search for faster filtering and since the values are sorted, same/similar values come together which yields better compression and offsets the storage overhead required by the row number mapping.
+
+* Advanced Push Down Optimizations: CarbonData pushes as much of query processing as possible close to the data to minimize the amount of data being read, processed, converted and transmitted/shuffled. Using projections and filters it reads only the required columns form the store and also reads only the rows that match the filter conditions provided in the query.
+
+* Multi Level Indexing: CarbonData uses multiple indices at various levels to enable faster search and speed up query processing.
+
+* Global Multi Dimensional Keys(MDK) based B+Tree Index for all non- measure columns: Aids in quickly locating the row groups(Data Blocks) that contain the data matching search/filter criteria.
+
+* Min-Max Index for all columns: Aids in quickly locating the row groups(Data Blocks) that contain the data matching search/filter criteria.
+
+* Data Block level Inverted Index for all columns: Aids in quickly locating the rows that contain the data matching search/filter criteria within a row group(Data Blocks).
+
+* Dictionary Encoding: Most databases and big data SQL data stores employ columnar encoding to achieve data compression by storing small integers numbers (surrogate value) instead of full string values. However, almost all existing databases and data stores divide the data into row groups containing anywhere from few thousand to a million rows and employ dictionary encoding only within each row group. Hence, the same column value can have different surrogate values in different row groups. So, while reading the data, conversion from surrogate value to actual value needs to be done immediately after the data is read from the disk. But CarbonData employs global surrogate key which means that a common dictionary is maintained for the full store on one machine/node. So CarbonData can perform all the query processing work such as grouping/aggregation, sorting etc on light weight surrogate values. The conversion from surrogate to actual values needs to be done only on the final result. Th
 is procedure improves performance on two aspects.	Conversion from surrogate values to actual values is done only for the final result rows which are much less than the actual rows read from the store. All query processing and computation such as grouping/aggregation, sorting, and so on is done on lightweight surrogate values which requires less memory and CPU time compared to actual values.
+
+* Deep Spark Integration: It has built-in spark integration for Spark 1.5, 1.6 and interfaces for Spark SQL, DataFrame API and query optimization. It supports bulk data ingestion and allows saving of spark dataframes as CarbonData files.
+
+* Update Delete Support: It supports batch updates like daily update scenarios for OLAP and Base+Delta file based design.
+
+* Store data along with index: Significantly accelerates query performance and reduces the I/O scans and CPU resources, when there are filters in the query. CarbonData index consists of multiple levels of indices. A processing framework can leverage this index to reduce the task it needs to schedule and process. It can also do skip scan in more finer grain units (called blocklet) in task side scanning instead of scanning the whole file.
+
+* Operable encoded data: It supports efficient compression and global encoding schemes and can query on compressed/encoded data. The data can be converted just before returning the results to the users, which is "late materialized".
+
+* Column group: Allows multiple columns to form a column group that would be stored as row format. This reduces the row reconstruction cost at query time.
+
+* Support for various use cases with one single Data format: Examples are interactive OLAP-style query, Sequential Access (big scan) and Random Access (narrow scan).
+
+##  Data Types
+
+#### CarbonData supports the following data types:
+
+  * Numeric Types
+  * SMALLINT
+  * INT/INTEGER
+  * BIGINT
+  * DOUBLE
+  * DECIMAL
+
+  * Date/Time Types
+  * TIMESTAMP
+
+  * String Types
+  * STRING
+
+  * Complex Types
+    * arrays: ARRAY``<data_type>``
+    * structs: STRUCT``<col_name : data_type COMMENT col_comment, ...>``
+
+##  Interfaces
+
+####  API
+CarbonData can be used in following scenarios:
+
+* For MapReduce application user
+
+   This User API is provided by carbon-hadoop. In this scenario, user can process CarbonData files in his MapReduce application by choosing CarbonInput/OutputFormat, and is responsible for using it correctly. Currently only CarbonInputFormat is provided and OutputFormat will be provided soon.
+
+* For Spark user
+
+   This User API is provided by Spark itself. There are two levels of APIs
+
+   * **CarbonData File**
+
+      Similar to parquet, json, or other data source in Spark, CarbonData can be used with data source API. For example (please refer to DataFrameAPIExample for more detail):
+      
+```
+      // User can create a DataFrame from any data source 
+      // or transformation.
+      val df = ...
+
+      // Write data
+      // User can write a DataFrame to a CarbonData file
+      df.write
+      .format("carbondata")
+      .option("tableName", "carbontable")
+      .mode(SaveMode.Overwrite)
+      .save()
+
+
+      // read CarbonData by data source API
+      df = carbonContext.read
+      .format("carbondata")
+      .option("tableName", "carbontable")
+      .load("/path")
+
+      // User can then use DataFrame for analysis
+      df.count
+      SVMWithSGD.train(df, numIterations)
+
+      // User can also register the DataFrame with a table name, 
+      // and use SQL for analysis
+      df.registerTempTable("t1")  // register temporary table 
+                                  // in SparkSQL catalog
+      df.registerHiveTable("t2")  // Or, use a implicit funtion 
+                                  // to register to Hive metastore
+      sqlContext.sql("select count(*) from t1").show
+```
+
+   * **Managed CarbonData Table**
+
+      CarbonData has in built support for high level concept like Table, Database, and supports full data lifecycle management, instead of dealing with just files user can use CarbonData specific DDL to manipulate data in Table and Database level. Please refer [DDL](https://github.com/HuaweiBigData/carbondata/wiki/Language-Manual:-DDL) and [DML](https://github.com/HuaweiBigData/carbondata/wiki/Language-Manual:-DML).
+      
+```
+      // Use SQL to manage table and query data
+      create database db1;
+      use database db1;
+      show databases;
+      create table tbl1 using org.apache.carbondata.spark;
+      load data into table tlb1 path 'some_files';
+      select count(*) from tbl1;
+```
+
+*   For developer who want to integrate CarbonData into processing engines like spark, hive or flink, use API provided by carbon-hadoop and carbon-processing:
+       - **Query** : Integrate carbon-hadoop with engine specific API, like spark data source API.
+
+       - **Data life cycle management** : CarbonData provides utility functions in carbon-processing to manage data life cycle, like data loading, compact, retention, schema evolution. Developer can implement DDLs of their choice and leverage these utility function to do data life cycle management.
+

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/quick-start-guide.md
----------------------------------------------------------------------
diff --git a/docs/quick-start-guide.md b/docs/quick-start-guide.md
new file mode 100644
index 0000000..8800ca6
--- /dev/null
+++ b/docs/quick-start-guide.md
@@ -0,0 +1,178 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# Quick Start
+This tutorial provides a quick introduction to using CarbonData.
+
+## Getting started with Apache CarbonData
+
+* [Installation](#installation)
+* [Prerequisites](#prerequisites)
+* [Interactive Analysis with Spark Shell Version 2.1](#interactive-analysis-with-spark-shell)
+  - Basics
+  - Executing Queries
+      * Creating a Table
+      * Loading Data to a Table
+      * Query Data from a Table
+* Interactive Analysis with Spark Shell Version 1.6
+   - Basics
+   - Executing Queries
+     * Creating a Table
+     * Loading Data to a Table
+     * Query Data from a Table
+* [Building CarbonData](#building-carbondata)
+
+
+##  Installation
+* Download a released package of [Spark 1.6.2 or 2.1.0](http://spark.apache.org/downloads.html).
+* Download and install [Apache Thrift 0.9.3](http://thrift-tutorial.readthedocs.io/en/latest/installation.html), make sure Thrift is added to system path.
+* Download [Apache CarbonData code](https://github.com/apache/incubator-carbondata) and build it. Please visit [Building CarbonData And IDE Configuration](https://github.com/apache/incubator-carbondata/blob/master/build/README.md) for more information.
+
+##  Prerequisites
+
+* Create a sample.csv file using the following commands. The CSV file is required for loading data into CarbonData.
+
+```
+$ cd carbondata
+$ cat > sample.csv << EOF
+  id,name,city,age
+  1,david,shenzhen,31
+  2,eason,shenzhen,27
+  3,jarry,wuhan,35
+  EOF
+```
+
+
+## Interactive Analysis with Spark Shell
+
+## Version 2.1
+
+Apache Spark Shell provides a simple way to learn the API, as well as a powerful tool to analyze data interactively. Please visit [Apache Spark Documentation](http://spark.apache.org/docs/latest/) for more details on Spark shell.
+
+#### Basics
+
+Start Spark shell by running the following command in the Spark directory:
+
+```
+./bin/spark-shell --jars <carbondata jar path>
+```
+
+In this shell, SparkSession is readily available as 'spark' and Spark context is readily available as 'sc'.
+
+In order to create a CarbonSession we will have to configure it explicitly in the following manner :
+
+* Import the following :
+
+```
+import org.apache.spark.sql.SparkSession
+import org.apache.spark.sql.CarbonSession._
+```
+
+* Create a CarbonSession :
+
+```
+val carbon = SparkSession.builder().config(sc.getConf).getOrCreateCarbonSession()
+```
+
+#### Executing Queries
+
+##### Creating a Table
+
+```
+scala>carbon.sql("create table if not exists test_table
+                (id string, name string, city string, age Int)
+                STORED BY 'carbondata'")
+```
+
+##### Loading Data to a Table
+
+```
+scala>carbon.sql(s"load data inpath '${new java.io.File("../carbondata/sample.csv").getCanonicalPath}' into table test_table")
+```
+
+###### Query Data from a Table
+
+```
+scala>spark.sql("select * from test_table").show
+
+scala>spark.sql("select city, avg(age),
+sum(age) from test_table group by city").show
+```
+
+
+## Interactive Analysis with Spark Shell
+## Version 1.6
+
+
+#### Basics
+
+Start Spark shell by running the following command in the Spark directory:
+
+```
+./bin/spark-shell --jars <carbondata jar path>
+```
+
+NOTE: In this shell, SparkContext is readily available as sc.
+
+* In order to execute the Queries we need to import CarbonContext:
+
+```
+import org.apache.spark.sql.CarbonContext
+```
+
+* Create an instance of CarbonContext in the following manner :
+
+```
+val cc = new CarbonContext(sc)
+```
+
+NOTE: By default store location is pointed to "../carbon.store", user can provide own store location to CarbonContext like new CarbonContext(sc, storeLocation).
+
+#### Executing Queries
+
+##### Creating a Table
+
+```
+scala>cc.sql("create table if not exists test_table (id string, name string, city string, age Int) STORED BY 'carbondata'")
+```
+To see the table created :
+
+```
+scala>cc.sql("show tables").show
+```
+
+##### Loading Data to a Table
+
+```
+scala>cc.sql(s"load data inpath '${new java.io.File("../carbondata/sample.csv").getCanonicalPath}' into table test_table")
+```
+
+##### Query Data from a Table
+
+```
+scala>cc.sql("select * from test_table").show
+scala>cc.sql("select city, avg(age), sum(age) from test_table group by city").show
+```
+
+## Building CarbonData
+
+To get started, get CarbonData from the [downloads](http://carbondata.incubator.apache.org/) section on the [http://carbondata.incubator.apache.org.](http://carbondata.incubator.apache.org.)
+CarbonData uses Hadoop’s client libraries for HDFS and YARN and Spark's libraries. Downloads are pre-packaged for a handful of popular Spark versions.
+
+If you’d like to build CarbonData from source, visit [Building CarbonData And IDE Configuration](https://github.com/apache/incubator-carbondata/blob/master/build/README.md).
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/table-of-content.md
----------------------------------------------------------------------
diff --git a/docs/table-of-content.md b/docs/table-of-content.md
new file mode 100644
index 0000000..cbec50b
--- /dev/null
+++ b/docs/table-of-content.md
@@ -0,0 +1,47 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+# Table of Contents
+
+* [Quick Start](quick-start-guide.md)
+    * [Getting started with Apache CarbonData]()
+* [User Guide](user-guide-toc.md)
+    * [Overview](overview-of-carbondata.md)
+       * Introduction
+       * CarbonData File Structure
+       * Features
+       * Data Types
+       * Interfaces
+    * [Installation Guide](installation-guide.md)
+       * Installing and Configuring CarbonData on Standalone Spark Cluster
+       * Installing and Configuring CarbonData on “Spark on YARN” Cluster
+    * [Configuring CarbonData](configuration-parameters.md)
+       * System Configuration
+       * Performance Configuration
+       * Miscellaneous Configuration
+       * Spark Configuration
+    * [Using CarbonData](using-carbondata.md)
+       * [Data Management](data-management.md)
+       * [DDL Operations on CarbonData](ddl-operation-on-carbondata.md )
+       * [DML Operations on CarbonData](dml-operation-on-carbondata.md )
+* [Useful Tips](useful-tips-on-carbondata.md)
+    * Suggestion to create CarbonData Table
+    * Configurations for Optimizing CarbonData Performance
+* [CarbonData Use Cases](use-cases-of-carbondata.md)
+* [Troubleshooting](troubleshooting.md)
+* [FAQs](faq.md)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/troubleshooting.md
----------------------------------------------------------------------
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
new file mode 100644
index 0000000..21d3db6
--- /dev/null
+++ b/docs/troubleshooting.md
@@ -0,0 +1,30 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# Troubleshooting
+This tutorial is designed to provide troubleshooting for end users and developers 
+who are building, deploying, and using CarbonData.
+
+### General Prevention and Best Practices
+ * When trying to create a table with a single numeric column, table creation fails: 
+   One column that can be considered as dimension is mandatory for table creation.
+         
+ * "Files locked for updation" when same table is accessed from two or more instances: 
+    Remove metastore_db from the examples folder.
+

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/use-cases-of-carbondata.md
----------------------------------------------------------------------
diff --git a/docs/use-cases-of-carbondata.md b/docs/use-cases-of-carbondata.md
new file mode 100644
index 0000000..112b6bc
--- /dev/null
+++ b/docs/use-cases-of-carbondata.md
@@ -0,0 +1,77 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# CarbonData Use Cases
+This tutorial discusses about the problems that CarbonData addresses. It shall take you through the identified top use cases of CarbonData.
+
+## Introduction
+For big data interactive analysis scenarios, many customers expect sub-second response to query TB-PB level data on general hardware clusters with just a few nodes.
+
+In the current big data ecosystem, there are few columnar storage formats such as ORC and Parquet that are designed for SQL on Big Data. Apache Hive’s ORC format is a columnar storage format with basic indexing capability. However, ORC cannot meet the sub-second query response expectation on TB level data, as it performs only stride level dictionary encoding and all analytical operations such as filtering and aggregation is done on the actual data. Apache Parquet is a columnar storage format that can improve performance in comparison to ORC due to its more efficient storage organization. Though Parquet can provide query response on TB level data in a few seconds, it is still far from the sub-second expectation of interactive analysis users. Cloudera Kudu can effectively solve some query performance issues, but kudu is not hadoop native, can’t seamlessly integrate historic HDFS data into new kudu system.
+
+However, CarbonData uses specially engineered optimizations targeted to improve performance of analytical queries which can include filters, aggregation and distinct counts,
+the required data to be stored in an indexed, well organized, read-optimized format, CarbonData’s query performance can achieve sub-second response.
+
+## Motivation: Single Format to provide Low Latency Response for all Use Cases
+The main motivation behind CarbonData is to provide a single storage format for all the usecases of querying big data on Hadoop. Thus CarbonData is able to cover all use-cases 
+into a single storage format.
+
+  ![Motivation](../../../src/site/markdown/images/carbon_data_motivation.png?raw=true)
+
+## Use Cases
+### Sequential Access
+  - Supports queries that select only a few columns with a group by clause but do not contain any filters. 
+  This results in full scan over the complete store for the selected columns.
+  
+  ![Sequential_Scan](../../../src/site/markdown/images/carbon_data_full_scan.png?raw=true)
+  
+  **Scenario**
+  
+  - ETL jobs
+  - Log Analysis
+    
+### Random Access
+  - Supports Point Query. These are queries used from operational applications and usually select all or most of the columns and involves a large number of 
+  filters which reduce the result to a small size. Such queries generally do not involve any aggregation or group by clause.
+    - Row-key query(like HBase)
+    - Narrow Scan
+    - Requires second/sub-second level low latency
+    
+   ![random_access](../../../src/site/markdown/images/carbon_data_random_scan.png?raw=true)
+    
+  **Scenario**
+
+   - Operational Query
+   - User Profiling
+    
+### Olap Style Query
+  - Supports Interactive data analysis for any dimensions. These are queries which are typically fired from Interactive Analysis tools. 
+  Such queries often select a few columns and involves filters and group by on a column or a grouping expression. 
+  It also supports queries that :
+    - Involves aggregation/join
+    - Roll-up,Drill-down,Slicing and Dicing
+    - Low-latency ad-hoc query
+    
+   ![Olap_style_query](../../../src/site/markdown/images/carbon_data_olap_scan.png?raw=true)
+    
+   **Scenario**
+    
+  - Dash-board reporting
+  - Fraud & Ad-hoc Analysis
+    

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/useful-tips-on-carbondata.md
----------------------------------------------------------------------
diff --git a/docs/useful-tips-on-carbondata.md b/docs/useful-tips-on-carbondata.md
new file mode 100644
index 0000000..b1ff903
--- /dev/null
+++ b/docs/useful-tips-on-carbondata.md
@@ -0,0 +1,180 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# Useful Tips
+This tutorial guides you to create CarbonData Tables and optimize performance.
+The following sections will elaborate on the above topics :
+
+* [Suggestions to create CarbonData Table](#suggestions-to-create-carbondata-table)
+* [Configurations For Optimizing CarbonData Performance](#configurations-for-optimizing-carbondata-performance)
+
+## Suggestions to Create CarbonData Table
+
+Recently CarbonData was used to analyze performance of Telecommunication field.
+The results of the analysis for table creation with dimensions ranging from
+10 thousand to 10 billion rows and 100 to 300 columns have been summarized below.  
+
+The following table describes some of the columns from the table used.
+ 
+ 
+**Table Column Description**
+
+| Column Name | Data Type     | Cardinality | Attribution |
+|-------------|---------------|-------------|-------------|
+| msisdn      | String        | 30 million  | Dimension   |
+| BEGIN_TIME  | BigInt        | 10 Thousand | Dimension   |
+| HOST        | String        | 1 million   | Dimension   |
+| Dime_1      | String        | 1 Thousand  | Dimension   |
+| counter_1   | Numeric(20,0) | NA          | Measure     |
+| ...         | ...           | NA          | Measure     |
+| counter_100 | Numeric(20,0) | NA          | Measure     |
+
+CarbonData has more than 50 test cases, on the basis of these we have following suggestions to enhance the query performance :
+
+
+
+* **Put the frequently-used column filter in the beginning**
+
+  For example, MSISDN filter is used in most of the query then we must put the MSISDN in the first column. 
+The create table command can be modified as suggested below :
+
+```
+  create table carbondata_table(
+  msisdn String,
+  ...
+  )STORED BY 'org.apache.carbondata.format' 
+  TBLPROPERTIES ( 'DICTIONARY_EXCLUDE'='MSISDN,..',
+  'DICTIONARY_INCLUDE'='...');
+```
+  
+  Now the query with MSISDN in the filter will be more efficient.
+
+
+* **Put the frequently-used columns in the order of low to high cardinality**
+  
+  If the table in the specified query has multiple columns which are frequently used to filter the results, it is suggested to put
+  the columns in the order of cardinality low to high. This ordering of frequently used columns improves the compression ratio and 
+  enhances the performance of queries with filter on these columns.
+  
+  For example if MSISDN, HOST and Dime_1 are frequently-used columns, then the column order of table is suggested as 
+  Dime_1>HOST>MSISDN as Dime_1 has the lowest cardinality. 
+  The create table command can be modified as suggested below :
+
+```
+  create table carbondata_table(
+  Dime_1 String,
+  HOST String,
+  MSISDN String,
+  ...
+  )STORED BY 'org.apache.carbondata.format' 
+  TBLPROPERTIES ( 'DICTIONARY_EXCLUDE'='MSISDN,HOST..',
+  'DICTIONARY_INCLUDE'='Dime_1..');
+```
+
+
+* **Put the Dimension type columns in order of low to high cardinality**
+
+  If the columns used to filter are not frequently used, then it is suggested to order all the columns of dimension type in order of low to high cardinality.
+The create table command can be modified as below :
+
+```
+  create table carbondata_table(
+  Dime_1 String,
+  BEGIN_TIME bigint
+  HOST String,
+  MSISDN String,
+  ...
+  )STORED BY 'org.apache.carbondata.format' 
+  TBLPROPERTIES ( 'DICTIONARY_EXCLUDE'='MSISDN,HOST,IMSI..',
+  'DICTIONARY_INCLUDE'='Dime_1,END_TIME,BEGIN_TIME..');
+```
+
+
+* **For measure type columns with non high accuracy, replace Numeric(20,0) data type with Double data type**
+
+  For columns of measure type, not requiring high accuracy, it is suggested to replace Numeric data type with Double to enhance 
+query performance. The create table command can be modified as below :
+
+```
+  create table carbondata_table(
+  Dime_1 String,
+  BEGIN_TIME bigint
+  HOST String,
+  MSISDN String,
+  counter_1 double,
+  counter_2 double,
+  ...
+  counter_100 double
+  )STORED BY 'org.apache.carbondata.format' 
+  TBLPROPERTIES ( 'DICTIONARY_EXCLUDE'='MSISDN,HOST,IMSI',
+  'DICTIONARY_INCLUDE'='Dime_1,END_TIME,BEGIN_TIME');
+```
+  The result of performance analysis of test-case shows reduction in query execution time from 15 to 3 seconds, thereby improving performance by nearly 5 times.
+
+ 
+* **Columns of incremental character should be re-arranged at the end of dimensions**
+
+  Consider the following scenario where data is loaded each day and the start_time is incremental for each load, it is
+suggested to put start_time at the end of dimensions. 
+
+  Incremental values are efficient in using min/max index. The create table command can be modified as below :
+
+```
+  create table carbondata_table(
+  Dime_1 String,
+  HOST String,
+  MSISDN String,
+  counter_1 double,
+  counter_2 double,
+  BEGIN_TIME bigint,
+  ...
+  counter_100 double
+  )STORED BY 'org.apache.carbondata.format' 
+  TBLPROPERTIES ( 'DICTIONARY_EXCLUDE'='MSISDN,HOST,IMSI',
+  'DICTIONARY_INCLUDE'='Dime_1,END_TIME,BEGIN_TIME'); 
+```
+
+
+* **Avoid adding high cardinality columns to dictionary**
+
+  If the system has low memory configuration, then it is suggested to exclude high cardinality columns from the dictionary to 
+enhance load performance. Creation of  dictionary for high cardinality columns at time of load will degrade load performance due to 
+excessive memory usage. 
+
+  By default CarbonData determines the cardinality at the first data load and allows for dictionary creation only if the cardinality is less than
+1 million.
+
+
+## Configurations for Optimizing CarbonData Performance
+
+Recently we did some performance POC on CarbonData for Finance and telecommunication Field. It involved detailed queries and aggregation 
+scenarios. After the completion of POC, some of the configurations impacting the performance have been identified and tabulated below :
+
+| Parameter | Location | Used For  | Description | Tuning |
+|----------------------------------------------|-----------------------------------|---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| carbon.sort.intermediate.files.limit | spark/carbonlib/carbon.properties | Data loading | During the loading of data, local temp is used to sort the data. This number specifies the minimum number of intermediate files after which the  merge sort has to be initiated. | Increasing the parameter to a higher value will improve the load performance. For example, when we increase the value from 20 to 100, it increases the data load performance from 35MB/S to more than 50MB/S. Higher values of this parameter consumes  more memory during the load. |
+| carbon.number.of.cores.while.loading | spark/carbonlib/carbon.properties | Data loading | Specifies the number of cores used for data processing during data loading in CarbonData. | If you have more number of CPUs, then you can increase the number of CPUs, which will increase the performance. For example if we increase the value from 2 to 4 then the CSV reading performance can increase about 1 times |
+| carbon.compaction.level.threshold | spark/carbonlib/carbon.properties | Data loading and Querying | For minor compaction, specifies the number of segments to be merged in stage 1 and number of compacted segments to be merged in stage 2. | Each CarbonData load will create one segment, if every load is small in size it will generate many small file over a period of time impacting the query performance. Configuring this parameter will merge the small segment to one big segment which will sort the data and improve the performance. For Example in one telecommunication scenario, the performance improves about 2 times after minor compaction. |
+| spark.sql.shuffle.partitions | spark/con/spark-defaults.conf | Querying | The number of task started when spark shuffle. | The value can be 1 to 2 times as much as the executor cores. In an aggregation scenario, reducing the number from 200 to 32 reduced the query time from 17 to 9 seconds. |
+| num-executors/executor-cores/executor-memory | spark/con/spark-defaults.conf | Querying | The number of executors, CPU cores, and memory used for CarbonData query. | In the bank scenario, we provide the 4 CPUs cores and 15 GB for each executor which can get good performance. This 2 value does not mean more the better. It needs to be configured properly in case of limited resources. For example, In the bank scenario, it has enough CPU 32 cores each node but less memory 64 GB each node. So we cannot give more CPU but less memory. For example, when 4 cores and 12GB for each executor. It sometimes happens GC during the query which impact the query performance very much from the 3 second to more than 15 seconds. In this scenario need to increase the memory or decrease the CPU cores. |
+| carbon.detail.batch.size | spark/carbonlib/carbon.properties | Data loading | The buffer size to store records, returned from the block scan. | In limit scenario this parameter is very important. For example your query limit is 1000. But if we set this value to 3000 that means we get 3000 records from scan but spark will only take 1000 rows. So the 2000 remaining are useless. In one Finance test case after we set it to 100, in the limit 1000 scenario the performance increase about 2 times in comparison to if we set this value to 12000. |
+| carbon.use.local.dir | spark/carbonlib/carbon.properties | Data loading | Whether use YARN local directories for multi-table load disk load balance | If this is set it to true CarbonData will use YARN local directories for multi-table load disk load balance, that will improve the data load performance. |
+
+
+ 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/user-guide-toc.md
----------------------------------------------------------------------
diff --git a/docs/user-guide-toc.md b/docs/user-guide-toc.md
new file mode 100644
index 0000000..c05fb09
--- /dev/null
+++ b/docs/user-guide-toc.md
@@ -0,0 +1,47 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+# User Guide
+Welcome to Apache CarbonData. Apache CarbonData(incubating) is a new big data file format for faster interactive query using advanced columnar storage, index, compression and encoding techniques to improve computing efficiency, which helps in speeding up queries by an order of magnitude faster over PetaBytes of data. 
+This user guide provides a detailed description about the CarbonData and its features.
+
+Let's get started !
+
+* [Overview](overview-of-carbondata.md)
+    * Introduction
+    * CarbonData File Structure
+    * Features
+    * Data Types
+    * Interfaces
+* [Installation Guide](installation-guide.md)
+    * Installing and Configuring CarbonData on Standalone Spark Cluster
+    * Installing and Configuring CarbonData on "Spark on YARN Cluster
+* [Configuring CarbonData](configuration-parameters.md)
+    * System Configuration
+    * Performance Configuration
+    * Miscellaneous Configuration
+    * Spark Configuration
+* [Using CarbonData](using-carbondata.md)
+    * [Data Management](data-management.md)
+    * [DDL Operations on CarbonData](ddl-operation-on-carbondata.md )
+    * [DML Operations on CarbonData](dml-operation-on-carbondata.md )
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/276a6111/docs/using-carbondata.md
----------------------------------------------------------------------
diff --git a/docs/using-carbondata.md b/docs/using-carbondata.md
new file mode 100644
index 0000000..83a3655
--- /dev/null
+++ b/docs/using-carbondata.md
@@ -0,0 +1,35 @@
+# Using CarbonData
+This tutorial discusses the disciplines related to management of data in Apache CarbonData.
+Following below each section is a brief introduction to respective disciplines related to data
+management.
+
+## Data Management
+This section shall be dealing with the disciplines related to managing data in the application,
+focusing on conceptual details related to operations like load data, delete data, update data
+and Compacting Data.
+
+For complete details refer to [Data Management](data-management.md)
+
+## Data Definition Language Support
+This section deals with the aspects related to creation and modification of the structure of database.
+It shall discuss in detail about
+
+*  Table creation
+*  Table deletion
+*  Table description
+*  Compaction
+
+For complete details refer to [DDL Operations on CarbonData](ddl-operation-on-carbondata.md )
+
+## Data Manipulation Language Support
+This section deals with the aspects related to data manipulation in database. It shall discuss in detail about selecting, loading and deleting in a database.
+This manipulation comprises of
+
+*  Loading data into database tables
+*  Retrieving existing data
+*  Deleting data from existing tables
+*  Deleting segments from existing tables
+*  Updating data in existing tables
+
+For complete details refer to [DML Operations on CarbonData](dml-operation-on-carbondata.md)
+


Mime
View raw message