You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2018/07/02 05:56:44 UTC

[kylin] 02/02: KYLIN-2554 Update Chinese docs

This is an automated email from the ASF dual-hosted git repository.

shaofengshi pushed a commit to branch document
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit f56bb1e275c1bbdf1352c87bf13fa31c6675d795
Author: shaofengshi <sh...@apache.org>
AuthorDate: Mon Jul 2 13:56:07 2018 +0800

    KYLIN-2554 Update Chinese docs
---
 website/_data/docs.yml                             |    7 +-
 website/_data/docs23-cn.yml                        |   35 +-
 website/_docs/index.cn.md                          |    1 +
 website/_docs/index.md                             |    2 +-
 website/_docs23/howto/howto_optimize_cubes.cn.md   |  212 ++++
 website/_docs23/howto/howto_use_restapi.cn.md      | 1205 ++++++++++++++++++++
 website/_docs23/index.cn.md                        |    2 +-
 website/_docs23/index.md                           |    2 +-
 website/_docs23/install/advance_settings.cn.md     |   19 +-
 website/_docs23/install/advance_settings.md        |   11 +
 website/_docs23/install/configuration.cn.md        |    2 +-
 website/_docs23/install/index.cn.md                |    2 +-
 website/_docs23/install/kylin_aws_emr.cn.md        |    2 +-
 website/_docs23/install/kylin_cluster.cn.md        |    2 +-
 website/_docs23/install/kylin_docker.cn.md         |    2 +-
 website/_docs23/tutorial/cube_build_job.cn.md      |    2 +-
 .../_docs23/tutorial/cube_build_performance.cn.md  |    8 +-
 website/_docs23/tutorial/cube_spark.cn.md          |    4 +-
 website/_docs23/tutorial/cube_streaming.cn.md      |    4 +-
 website/_docs23/tutorial/jdbc.cn.md                |    2 +-
 website/_docs23/tutorial/kylin_client_tool.cn.md   |    2 +-
 website/_docs23/tutorial/kylin_sample.cn.md        |    4 +-
 website/_docs23/tutorial/odbc.cn.md                |    2 +-
 website/_docs23/tutorial/powerbi.cn.md             |    2 +-
 website/_docs23/tutorial/project_level_acl.cn.md   |   63 +
 .../_docs23/tutorial/setup_jdbc_datasource.cn.md   |    2 +-
 website/_docs23/tutorial/setup_systemcube.cn.md    |    2 +-
 website/_docs23/tutorial/spark.cn.md               |   90 ++
 website/_docs23/tutorial/squirrel.cn.md            |  112 ++
 website/_docs23/tutorial/tableau.cn.md             |    8 +-
 website/_docs23/tutorial/tableau_91.cn.md          |    4 -
 website/_docs23/tutorial/tableau_91.md             |    4 -
 website/_docs23/tutorial/use_cube_planner.cn.md    |   10 +-
 website/_docs23/tutorial/use_dashboard.cn.md       |    2 +-
 website/_layouts/docs23-cn.html                    |    6 +-
 35 files changed, 1776 insertions(+), 63 deletions(-)

diff --git a/website/_data/docs.yml b/website/_data/docs.yml
index 40012c0..dcbdd34 100644
--- a/website/_data/docs.yml
+++ b/website/_data/docs.yml
@@ -28,13 +28,12 @@
 - title: Installation
   docs:
   - install/index
-  - install/manual_install_guide
-  - install/configuration
   - install/kylin_cluster
+  - install/configuration
   - install/advance_settings
-  - install/kylin_docker
   - install/kylin_aws_emr
-
+  - install/kylin_docker
+  
 - title: Tutorial
   docs:
   - tutorial/kylin_sample
diff --git a/website/_data/docs23-cn.yml b/website/_data/docs23-cn.yml
index ef35796..afc5a1a 100644
--- a/website/_data/docs23-cn.yml
+++ b/website/_data/docs23-cn.yml
@@ -18,25 +18,46 @@
 
 - title: 安装
   docs:
-  - install/manual_install_guide
+  - install/index
+  - install/kylin_cluster
+  - install/configuration
+  - install/advance_settings
+  - install/kylin_aws_emr
+  - install/kylin_docker
 
 - title: 教程
   docs:
+  - tutorial/kylin_sample
+  - tutorial/web
   - tutorial/create_cube
   - tutorial/cube_build_job
   - tutorial/project_level_acl
-  - tutorial/web
+  - tutorial/cube_spark
+  - tutorial/cube_streaming
+  - tutorial/cube_build_performance
   - tutorial/kylin_client_tool
+  - tutorial/setup_systemcube
+  - tutorial/use_cube_planner
+  - tutorial/use_dashboard
+  - tutorial/setup_jdbc_datasource
+
+- title: 工具集成
+  docs:
+  - tutorial/odbc
+  - tutorial/jdbc
   - tutorial/tableau
   - tutorial/tableau_91
   - tutorial/powerbi
-  - tutorial/odbc
+  - tutorial/microstrategy
+  - tutorial/squirrel
   - tutorial/Qlik
 
+
 - title: 帮助
-  docs:
-  - howto/howto_backup_metadata
+  docs:  
+  - howto/howto_use_restapi
   - howto/howto_build_cube_with_restapi
-  - howto/howto_cleanup_storage
-  - howto/howto_jdbc
+  - howto/howto_optimize_cubes
   - howto/howto_optimize_build
+  - howto/howto_backup_metadata
+  - howto/howto_cleanup_storage
diff --git a/website/_docs/index.cn.md b/website/_docs/index.cn.md
index 97742dc..c741e05 100644
--- a/website/_docs/index.cn.md
+++ b/website/_docs/index.cn.md
@@ -16,6 +16,7 @@ Apache Kylin™是一个开源的分布式分析引擎,提供Hadoop之上的SQ
 * [v2.1.x and v2.2.x document](/cn/docs21/)
 * [v2.0.x document](/cn/docs20/)
 * [v1.6.x document](/cn/docs16/)
+* [归档](/archive/)
 
 安装 
 ------------  
diff --git a/website/_docs/index.md b/website/_docs/index.md
index b03997a..60bc194 100644
--- a/website/_docs/index.md
+++ b/website/_docs/index.md
@@ -16,7 +16,7 @@ This is the document for the latest released version (v2.4). Document of prior v
 * [v2.1.x and v2.2.x document](/docs21/)
 * [v2.0.x document](/docs20/)
 * [v1.6.x document](/docs16/)
-
+* [Archive](/archive/)
 
 Installation & Setup
 ------------  
diff --git a/website/_docs23/howto/howto_optimize_cubes.cn.md b/website/_docs23/howto/howto_optimize_cubes.cn.md
new file mode 100644
index 0000000..2ca2465
--- /dev/null
+++ b/website/_docs23/howto/howto_optimize_cubes.cn.md
@@ -0,0 +1,212 @@
+---
+layout: docs23-cn
+title:  优化 Cube 设计
+categories: howto
+permalink: /cn/docs23/howto/howto_optimize_cubes.html
+---
+
+## Hierarchies:
+
+Theoretically for N dimensions you'll end up with 2^N dimension combinations. However for some group of dimensions there are no need to create so many combinations. For example, if you have three dimensions: continent, country, city (In hierarchies, the "bigger" dimension comes first). You will only need the following three combinations of group by when you do drill down analysis:
+
+group by continent
+group by continent, country
+group by continent, country, city
+
+In such cases the combination count is reduced from 2^3=8 to 3, which is a great optimization. The same goes for the YEAR,QUATER,MONTH,DATE case.
+
+If we Donate the hierarchy dimension as H1,H2,H3, typical scenarios would be:
+
+
+A. Hierarchies on lookup table
+
+
+<table>
+  <tr>
+    <td align="center">Fact table</td>
+    <td align="center">(joins)</td>
+    <td align="center">Lookup Table</td>
+  </tr>
+  <tr>
+    <td>column1,column2,,,,,, FK</td>
+    <td></td>
+    <td>PK,,H1,H2,H3,,,,</td>
+  </tr>
+</table>
+
+---
+
+B. Hierarchies on fact table
+
+
+<table>
+  <tr>
+    <td align="center">Fact table</td>
+  </tr>
+  <tr>
+    <td>column1,column2,,,H1,H2,H3,,,,,,, </td>
+  </tr>
+</table>
+
+---
+
+
+There is a special case for scenario A, where PK on the lookup table is accidentally being part of the hierarchies. For example we have a calendar lookup table where cal_dt is the primary key:
+
+A*. Hierarchies on lookup table over its primary key
+
+
+<table>
+  <tr>
+    <td align="center">Lookup Table(Calendar)</td>
+  </tr>
+  <tr>
+    <td>cal_dt(PK), week_beg_dt, month_beg_dt, quarter_beg_dt,,,</td>
+  </tr>
+</table>
+
+---
+
+
+For cases like A* what you need is another optimization called "Derived Columns"
+
+## Derived Columns:
+
+Derived column is used when one or more dimensions (They must be dimension on lookup table, these columns are called "Derived") can be deduced from another(Usually it is the corresponding FK, this is called the "host column")
+
+For example, suppose we have a lookup table where we join fact table and it with "where DimA = DimX". Notice in Kylin, if you choose FK into a dimension, the corresponding PK will be automatically querable, without any extra cost. The secret is that since FK and PK are always identical, Kylin can apply filters/groupby on the FK first, and transparently replace them to PK.  This indicates that if we want the DimA(FK), DimX(PK), DimB, DimC in our cube, we can safely choose DimA,DimB,DimC only.
+
+<table>
+  <tr>
+    <td align="center">Fact table</td>
+    <td align="center">(joins)</td>
+    <td align="center">Lookup Table</td>
+  </tr>
+  <tr>
+    <td>column1,column2,,,,,, DimA(FK) </td>
+    <td></td>
+    <td>DimX(PK),,DimB, DimC</td>
+  </tr>
+</table>
+
+---
+
+
+Let's say that DimA(the dimension representing FK/PK) has a special mapping to DimB:
+
+
+<table>
+  <tr>
+    <th>dimA</th>
+    <th>dimB</th>
+    <th>dimC</th>
+  </tr>
+  <tr>
+    <td>1</td>
+    <td>a</td>
+    <td>?</td>
+  </tr>
+  <tr>
+    <td>2</td>
+    <td>b</td>
+    <td>?</td>
+  </tr>
+  <tr>
+    <td>3</td>
+    <td>c</td>
+    <td>?</td>
+  </tr>
+  <tr>
+    <td>4</td>
+    <td>a</td>
+    <td>?</td>
+  </tr>
+</table>
+
+
+in this case, given a value in DimA, the value of DimB is determined, so we say dimB can be derived from DimA. When we build a cube that contains both DimA and DimB, we simple include DimA, and marking DimB as derived. Derived column(DimB) does not participant in cuboids generation:
+
+original combinations:
+ABC,AB,AC,BC,A,B,C
+
+combinations when driving B from A:
+AC,A,C
+
+at Runtime, in case queries like "select count(*) from fact_table inner join looup1 group by looup1 .dimB", it is expecting cuboid containing DimB to answer the query. However, DimB will appear in NONE of the cuboids due to derived optimization. In this case, we modify the execution plan to make it group by  DimA(its host column) first, we'll get intermediate answer like:
+
+
+<table>
+  <tr>
+    <th>DimA</th>
+    <th>count(*)</th>
+  </tr>
+  <tr>
+    <td>1</td>
+    <td>1</td>
+  </tr>
+  <tr>
+    <td>2</td>
+    <td>1</td>
+  </tr>
+  <tr>
+    <td>3</td>
+    <td>1</td>
+  </tr>
+  <tr>
+    <td>4</td>
+    <td>1</td>
+  </tr>
+</table>
+
+
+Afterwards, Kylin will replace DimA values with DimB values(since both of their values are in lookup table, Kylin can load the whole lookup table into memory and build a mapping for them), and the intermediate result becomes:
+
+
+<table>
+  <tr>
+    <th>DimB</th>
+    <th>count(*)</th>
+  </tr>
+  <tr>
+    <td>a</td>
+    <td>1</td>
+  </tr>
+  <tr>
+    <td>b</td>
+    <td>1</td>
+  </tr>
+  <tr>
+    <td>c</td>
+    <td>1</td>
+  </tr>
+  <tr>
+    <td>a</td>
+    <td>1</td>
+  </tr>
+</table>
+
+
+After this, the runtime SQL engine(calcite) will further aggregate the intermediate result to:
+
+
+<table>
+  <tr>
+    <th>DimB</th>
+    <th>count(*)</th>
+  </tr>
+  <tr>
+    <td>a</td>
+    <td>2</td>
+  </tr>
+  <tr>
+    <td>b</td>
+    <td>1</td>
+  </tr>
+  <tr>
+    <td>c</td>
+    <td>1</td>
+  </tr>
+</table>
+
+
+this step happens at query runtime, this is what it means "at the cost of extra runtime aggregation"
diff --git a/website/_docs23/howto/howto_use_restapi.cn.md b/website/_docs23/howto/howto_use_restapi.cn.md
new file mode 100644
index 0000000..a3399d0
--- /dev/null
+++ b/website/_docs23/howto/howto_use_restapi.cn.md
@@ -0,0 +1,1205 @@
+---
+layout: docs23-cn
+title:  Use RESTful API
+categories: howto
+permalink: /cn/docs23/howto/howto_use_restapi.html
+since: v0.7.1
+---
+
+This page lists the major RESTful APIs provided by Kylin.
+
+* Query
+   * [Authentication](#authentication)
+   * [Query](#query)
+   * [List queryable tables](#list-queryable-tables)
+* CUBE
+   * [List cubes](#list-cubes)
+   * [Get cube](#get-cube)
+   * [Get cube descriptor (dimension, measure info, etc)](#get-cube-descriptor)
+   * [Get data model (fact and lookup table info)](#get-data-model)
+   * [Build cube](#build-cube)
+   * [Enable cube](#enable-cube)
+   * [Disable cube](#disable-cube)
+   * [Purge cube](#purge-cube)
+   * [Delete segment](#delete-segment)
+* JOB
+   * [Resume job](#resume-job)
+   * [Pause job](#pause-job)
+   * [Discard job](#discard-job)
+   * [Get job status](#get-job-status)
+   * [Get job step output](#get-job-step-output)
+   * [Get job list](#get-job-list)
+* Metadata
+   * [Get Hive Table](#get-hive-table)
+   * [Get Hive Tables](#get-hive-tables)
+   * [Load Hive Tables](#load-hive-tables)
+* Cache
+   * [Wipe cache](#wipe-cache)
+* Streaming
+   * [Initiate cube start position](#initiate-cube-start-position)
+   * [Build stream cube](#build-stream-cube)
+   * [Check segment holes](#check-segment-holes)
+   * [Fill segment holes](#fill-segment-holes)
+
+## Authentication
+`POST /kylin/api/user/authentication`
+
+#### Request Header
+Authorization data encoded by basic auth is needed in the header, such as:
+Authorization:Basic {data}
+
+#### Response Body
+* userDetails - Defined authorities and status of current user.
+
+#### Response Sample
+
+```sh
+{  
+   "userDetails":{  
+      "password":null,
+      "username":"sample",
+      "authorities":[  
+         {  
+            "authority":"ROLE_ANALYST"
+         },
+         {  
+            "authority":"ROLE_MODELER"
+         }
+      ],
+      "accountNonExpired":true,
+      "accountNonLocked":true,
+      "credentialsNonExpired":true,
+      "enabled":true
+   }
+}
+```
+
+#### Curl Example
+
+```
+curl -c /path/to/cookiefile.txt -X POST -H "Authorization: Basic XXXXXXXXX" -H 'Content-Type: application/json' http://<host>:<port>/kylin/api/user/authentication
+```
+
+If login successfully, the JSESSIONID will be saved into the cookie file; In the subsequent http requests, attach the cookie, for example:
+
+```
+curl -b /path/to/cookiefile.txt -X PUT -H 'Content-Type: application/json' -d '{"startTime":'1423526400000', "endTime":'1423526400', "buildType":"BUILD"}' http://<host>:<port>/kylin/api/cubes/your_cube/build
+```
+
+Alternatively, you can provide the username/password with option "user" in each curl call; please note this has the risk of password leak in shell history:
+
+
+```
+curl -X PUT --user ADMIN:KYLIN -H "Content-Type: application/json;charset=utf-8" -d '{ "startTime": 820454400000, "endTime": 821318400000, "buildType": "BUILD"}' http://localhost:7070/kylin/api/cubes/kylin_sales/build
+```
+
+***
+
+## Query
+`POST /kylin/api/query`
+
+#### Request Body
+* sql - `required` `string` The text of sql statement.
+* offset - `optional` `int` Query offset. If offset is set in sql, curIndex will be ignored.
+* limit - `optional` `int` Query limit. If limit is set in sql, perPage will be ignored.
+* acceptPartial - `optional` `bool` Whether accept a partial result or not, default be "false". Set to "false" for production use. 
+* project - `optional` `string` Project to perform query. Default value is 'DEFAULT'.
+
+#### Request Sample
+
+```sh
+{  
+   "sql":"select * from TEST_KYLIN_FACT",
+   "offset":0,
+   "limit":50000,
+   "acceptPartial":false,
+   "project":"DEFAULT"
+}
+```
+
+#### Curl Example
+
+```
+curl -X POST -H "Authorization: Basic XXXXXXXXX" -H "Content-Type: application/json" -d '{ "sql":"select count(*) from TEST_KYLIN_FACT", "project":"learn_kylin" }' http://localhost:7070/kylin/api/query
+```
+
+#### Response Body
+* columnMetas - Column metadata information of result set.
+* results - Data set of result.
+* cube - Cube used for this query.
+* affectedRowCount - Count of affected row by this sql statement.
+* isException - Whether this response is an exception.
+* ExceptionMessage - Message content of the exception.
+* Duration - Time cost of this query
+* Partial - Whether the response is a partial result or not. Decided by `acceptPartial` of request.
+
+#### Response Sample
+
+```sh
+{  
+   "columnMetas":[  
+      {  
+         "isNullable":1,
+         "displaySize":0,
+         "label":"CAL_DT",
+         "name":"CAL_DT",
+         "schemaName":null,
+         "catelogName":null,
+         "tableName":null,
+         "precision":0,
+         "scale":0,
+         "columnType":91,
+         "columnTypeName":"DATE",
+         "readOnly":true,
+         "writable":false,
+         "caseSensitive":true,
+         "searchable":false,
+         "currency":false,
+         "signed":true,
+         "autoIncrement":false,
+         "definitelyWritable":false
+      },
+      {  
+         "isNullable":1,
+         "displaySize":10,
+         "label":"LEAF_CATEG_ID",
+         "name":"LEAF_CATEG_ID",
+         "schemaName":null,
+         "catelogName":null,
+         "tableName":null,
+         "precision":10,
+         "scale":0,
+         "columnType":4,
+         "columnTypeName":"INTEGER",
+         "readOnly":true,
+         "writable":false,
+         "caseSensitive":true,
+         "searchable":false,
+         "currency":false,
+         "signed":true,
+         "autoIncrement":false,
+         "definitelyWritable":false
+      }
+   ],
+   "results":[  
+      [  
+         "2013-08-07",
+         "32996",
+         "15",
+         "15",
+         "Auction",
+         "10000000",
+         "49.048952730908745",
+         "49.048952730908745",
+         "49.048952730908745",
+         "1"
+      ],
+      [  
+         "2013-08-07",
+         "43398",
+         "0",
+         "14",
+         "ABIN",
+         "10000633",
+         "85.78317064220418",
+         "85.78317064220418",
+         "85.78317064220418",
+         "1"
+      ]
+   ],
+   "cube":"test_kylin_cube_with_slr_desc",
+   "affectedRowCount":0,
+   "isException":false,
+   "exceptionMessage":null,
+   "duration":3451,
+   "partial":false
+}
+```
+
+
+## List queryable tables
+`GET /kylin/api/tables_and_columns`
+
+#### Request Parameters
+* project - `required` `string` The project to load tables
+
+#### Response Sample
+```sh
+[  
+   {  
+      "columns":[  
+         {  
+            "table_NAME":"TEST_CAL_DT",
+            "table_SCHEM":"EDW",
+            "column_NAME":"CAL_DT",
+            "data_TYPE":91,
+            "nullable":1,
+            "column_SIZE":-1,
+            "buffer_LENGTH":-1,
+            "decimal_DIGITS":0,
+            "num_PREC_RADIX":10,
+            "column_DEF":null,
+            "sql_DATA_TYPE":-1,
+            "sql_DATETIME_SUB":-1,
+            "char_OCTET_LENGTH":-1,
+            "ordinal_POSITION":1,
+            "is_NULLABLE":"YES",
+            "scope_CATLOG":null,
+            "scope_SCHEMA":null,
+            "scope_TABLE":null,
+            "source_DATA_TYPE":-1,
+            "iS_AUTOINCREMENT":null,
+            "table_CAT":"defaultCatalog",
+            "remarks":null,
+            "type_NAME":"DATE"
+         },
+         {  
+            "table_NAME":"TEST_CAL_DT",
+            "table_SCHEM":"EDW",
+            "column_NAME":"WEEK_BEG_DT",
+            "data_TYPE":91,
+            "nullable":1,
+            "column_SIZE":-1,
+            "buffer_LENGTH":-1,
+            "decimal_DIGITS":0,
+            "num_PREC_RADIX":10,
+            "column_DEF":null,
+            "sql_DATA_TYPE":-1,
+            "sql_DATETIME_SUB":-1,
+            "char_OCTET_LENGTH":-1,
+            "ordinal_POSITION":2,
+            "is_NULLABLE":"YES",
+            "scope_CATLOG":null,
+            "scope_SCHEMA":null,
+            "scope_TABLE":null,
+            "source_DATA_TYPE":-1,
+            "iS_AUTOINCREMENT":null,
+            "table_CAT":"defaultCatalog",
+            "remarks":null,
+            "type_NAME":"DATE"
+         }
+      ],
+      "table_NAME":"TEST_CAL_DT",
+      "table_SCHEM":"EDW",
+      "ref_GENERATION":null,
+      "self_REFERENCING_COL_NAME":null,
+      "type_SCHEM":null,
+      "table_TYPE":"TABLE",
+      "table_CAT":"defaultCatalog",
+      "remarks":null,
+      "type_CAT":null,
+      "type_NAME":null
+   }
+]
+```
+
+***
+
+## List cubes
+`GET /kylin/api/cubes`
+
+#### Request Parameters
+* offset - `required` `int` Offset used by pagination
+* limit - `required` `int ` Cubes per page.
+* cubeName - `optional` `string` Keyword for cube names. To find cubes whose name contains this keyword.
+* projectName - `optional` `string` Project name.
+
+#### Response Sample
+```sh
+[  
+   {  
+      "uuid":"1eaca32a-a33e-4b69-83dd-0bb8b1f8c53b",
+      "last_modified":1407831634847,
+      "name":"test_kylin_cube_with_slr_empty",
+      "owner":null,
+      "version":null,
+      "descriptor":"test_kylin_cube_with_slr_desc",
+      "cost":50,
+      "status":"DISABLED",
+      "segments":[  
+      ],
+      "create_time":null,
+      "source_records_count":0,
+      "source_records_size":0,
+      "size_kb":0
+   }
+]
+```
+
+## Get cube
+`GET /kylin/api/cubes/{cubeName}`
+
+#### Path Variable
+* cubeName - `required` `string` Cube name to find.
+
+## Get cube descriptor
+`GET /kylin/api/cube_desc/{cubeName}`
+Get descriptor for specified cube instance.
+
+#### Path Variable
+* cubeName - `required` `string` Cube name.
+
+#### Response Sample
+```sh
+[
+    {
+        "uuid": "a24ca905-1fc6-4f67-985c-38fa5aeafd92", 
+        "name": "test_kylin_cube_with_slr_desc", 
+        "description": null, 
+        "dimensions": [
+            {
+                "id": 0, 
+                "name": "CAL_DT", 
+                "table": "EDW.TEST_CAL_DT", 
+                "column": null, 
+                "derived": [
+                    "WEEK_BEG_DT"
+                ], 
+                "hierarchy": false
+            }, 
+            {
+                "id": 1, 
+                "name": "CATEGORY", 
+                "table": "DEFAULT.TEST_CATEGORY_GROUPINGS", 
+                "column": null, 
+                "derived": [
+                    "USER_DEFINED_FIELD1", 
+                    "USER_DEFINED_FIELD3", 
+                    "UPD_DATE", 
+                    "UPD_USER"
+                ], 
+                "hierarchy": false
+            }, 
+            {
+                "id": 2, 
+                "name": "CATEGORY_HIERARCHY", 
+                "table": "DEFAULT.TEST_CATEGORY_GROUPINGS", 
+                "column": [
+                    "META_CATEG_NAME", 
+                    "CATEG_LVL2_NAME", 
+                    "CATEG_LVL3_NAME"
+                ], 
+                "derived": null, 
+                "hierarchy": true
+            }, 
+            {
+                "id": 3, 
+                "name": "LSTG_FORMAT_NAME", 
+                "table": "DEFAULT.TEST_KYLIN_FACT", 
+                "column": [
+                    "LSTG_FORMAT_NAME"
+                ], 
+                "derived": null, 
+                "hierarchy": false
+            }, 
+            {
+                "id": 4, 
+                "name": "SITE_ID", 
+                "table": "EDW.TEST_SITES", 
+                "column": null, 
+                "derived": [
+                    "SITE_NAME", 
+                    "CRE_USER"
+                ], 
+                "hierarchy": false
+            }, 
+            {
+                "id": 5, 
+                "name": "SELLER_TYPE_CD", 
+                "table": "EDW.TEST_SELLER_TYPE_DIM", 
+                "column": null, 
+                "derived": [
+                    "SELLER_TYPE_DESC"
+                ], 
+                "hierarchy": false
+            }, 
+            {
+                "id": 6, 
+                "name": "SELLER_ID", 
+                "table": "DEFAULT.TEST_KYLIN_FACT", 
+                "column": [
+                    "SELLER_ID"
+                ], 
+                "derived": null, 
+                "hierarchy": false
+            }
+        ], 
+        "measures": [
+            {
+                "id": 1, 
+                "name": "GMV_SUM", 
+                "function": {
+                    "expression": "SUM", 
+                    "parameter": {
+                        "type": "column", 
+                        "value": "PRICE", 
+                        "next_parameter": null
+                    }, 
+                    "returntype": "decimal(19,4)"
+                }, 
+                "dependent_measure_ref": null
+            }, 
+            {
+                "id": 2, 
+                "name": "GMV_MIN", 
+                "function": {
+                    "expression": "MIN", 
+                    "parameter": {
+                        "type": "column", 
+                        "value": "PRICE", 
+                        "next_parameter": null
+                    }, 
+                    "returntype": "decimal(19,4)"
+                }, 
+                "dependent_measure_ref": null
+            }, 
+            {
+                "id": 3, 
+                "name": "GMV_MAX", 
+                "function": {
+                    "expression": "MAX", 
+                    "parameter": {
+                        "type": "column", 
+                        "value": "PRICE", 
+                        "next_parameter": null
+                    }, 
+                    "returntype": "decimal(19,4)"
+                }, 
+                "dependent_measure_ref": null
+            }, 
+            {
+                "id": 4, 
+                "name": "TRANS_CNT", 
+                "function": {
+                    "expression": "COUNT", 
+                    "parameter": {
+                        "type": "constant", 
+                        "value": "1", 
+                        "next_parameter": null
+                    }, 
+                    "returntype": "bigint"
+                }, 
+                "dependent_measure_ref": null
+            }, 
+            {
+                "id": 5, 
+                "name": "ITEM_COUNT_SUM", 
+                "function": {
+                    "expression": "SUM", 
+                    "parameter": {
+                        "type": "column", 
+                        "value": "ITEM_COUNT", 
+                        "next_parameter": null
+                    }, 
+                    "returntype": "bigint"
+                }, 
+                "dependent_measure_ref": null
+            }
+        ], 
+        "rowkey": {
+            "rowkey_columns": [
+                {
+                    "column": "SELLER_ID", 
+                    "length": 18, 
+                    "dictionary": null, 
+                    "mandatory": true
+                }, 
+                {
+                    "column": "CAL_DT", 
+                    "length": 0, 
+                    "dictionary": "true", 
+                    "mandatory": false
+                }, 
+                {
+                    "column": "LEAF_CATEG_ID", 
+                    "length": 0, 
+                    "dictionary": "true", 
+                    "mandatory": false
+                }, 
+                {
+                    "column": "META_CATEG_NAME", 
+                    "length": 0, 
+                    "dictionary": "true", 
+                    "mandatory": false
+                }, 
+                {
+                    "column": "CATEG_LVL2_NAME", 
+                    "length": 0, 
+                    "dictionary": "true", 
+                    "mandatory": false
+                }, 
+                {
+                    "column": "CATEG_LVL3_NAME", 
+                    "length": 0, 
+                    "dictionary": "true", 
+                    "mandatory": false
+                }, 
+                {
+                    "column": "LSTG_FORMAT_NAME", 
+                    "length": 12, 
+                    "dictionary": null, 
+                    "mandatory": false
+                }, 
+                {
+                    "column": "LSTG_SITE_ID", 
+                    "length": 0, 
+                    "dictionary": "true", 
+                    "mandatory": false
+                }, 
+                {
+                    "column": "SLR_SEGMENT_CD", 
+                    "length": 0, 
+                    "dictionary": "true", 
+                    "mandatory": false
+                }
+            ], 
+            "aggregation_groups": [
+                [
+                    "LEAF_CATEG_ID", 
+                    "META_CATEG_NAME", 
+                    "CATEG_LVL2_NAME", 
+                    "CATEG_LVL3_NAME", 
+                    "CAL_DT"
+                ]
+            ]
+        }, 
+        "signature": "lsLAl2jL62ZApmOLZqWU3g==", 
+        "last_modified": 1445850327000, 
+        "model_name": "test_kylin_with_slr_model_desc", 
+        "null_string": null, 
+        "hbase_mapping": {
+            "column_family": [
+                {
+                    "name": "F1", 
+                    "columns": [
+                        {
+                            "qualifier": "M", 
+                            "measure_refs": [
+                                "GMV_SUM", 
+                                "GMV_MIN", 
+                                "GMV_MAX", 
+                                "TRANS_CNT", 
+                                "ITEM_COUNT_SUM"
+                            ]
+                        }
+                    ]
+                }
+            ]
+        }, 
+        "notify_list": null, 
+        "auto_merge_time_ranges": null, 
+        "retention_range": 0
+    }
+]
+```
+
+## Get data model
+`GET /kylin/api/model/{modelName}`
+
+#### Path Variable
+* modelName - `required` `string` Data model name, by default it should be the same with cube name.
+
+#### Response Sample
+```sh
+{
+    "uuid": "ff527b94-f860-44c3-8452-93b17774c647", 
+    "name": "test_kylin_with_slr_model_desc", 
+    "lookups": [
+        {
+            "table": "EDW.TEST_CAL_DT", 
+            "join": {
+                "type": "inner", 
+                "primary_key": [
+                    "CAL_DT"
+                ], 
+                "foreign_key": [
+                    "CAL_DT"
+                ]
+            }
+        }, 
+        {
+            "table": "DEFAULT.TEST_CATEGORY_GROUPINGS", 
+            "join": {
+                "type": "inner", 
+                "primary_key": [
+                    "LEAF_CATEG_ID", 
+                    "SITE_ID"
+                ], 
+                "foreign_key": [
+                    "LEAF_CATEG_ID", 
+                    "LSTG_SITE_ID"
+                ]
+            }
+        }
+    ], 
+    "capacity": "MEDIUM", 
+    "last_modified": 1442372116000, 
+    "fact_table": "DEFAULT.TEST_KYLIN_FACT", 
+    "filter_condition": null, 
+    "partition_desc": {
+        "partition_date_column": "DEFAULT.TEST_KYLIN_FACT.CAL_DT", 
+        "partition_date_start": 0, 
+        "partition_date_format": "yyyy-MM-dd", 
+        "partition_type": "APPEND", 
+        "partition_condition_builder": "org.apache.kylin.metadata.model.PartitionDesc$DefaultPartitionConditionBuilder"
+    }
+}
+```
+
+## Build cube
+`PUT /kylin/api/cubes/{cubeName}/build`
+
+#### Path Variable
+* cubeName - `required` `string` Cube name.
+
+#### Request Body
+* startTime - `required` `long` Start timestamp of data to build, e.g. 1388563200000 for 2014-1-1
+* endTime - `required` `long` End timestamp of data to build
+* buildType - `required` `string` Supported build type: 'BUILD', 'MERGE', 'REFRESH'
+
+#### Curl Example
+```
+curl -X PUT -H "Authorization: Basic XXXXXXXXX" -H 'Content-Type: application/json' -d '{"startTime":'1423526400000', "endTime":'1423526400', "buildType":"BUILD"}' http://<host>:<port>/kylin/api/cubes/{cubeName}/build
+```
+
+#### Response Sample
+```
+{  
+   "uuid":"c143e0e4-ac5f-434d-acf3-46b0d15e3dc6",
+   "last_modified":1407908916705,
+   "name":"test_kylin_cube_with_slr_empty - 19700101000000_20140731160000 - BUILD - PDT 2014-08-12 22:48:36",
+   "type":"BUILD",
+   "duration":0,
+   "related_cube":"test_kylin_cube_with_slr_empty",
+   "related_segment":"19700101000000_20140731160000",
+   "exec_start_time":0,
+   "exec_end_time":0,
+   "mr_waiting":0,
+   "steps":[  
+      {  
+         "interruptCmd":null,
+         "name":"Create Intermediate Flat Hive Table",
+         "sequence_id":0,
+         "exec_cmd":"hive -e \"DROP TABLE IF EXISTS kylin_intermediate_test_kylin_cube_with_slr_desc_19700101000000_20140731160000_c143e0e4_ac5f_434d_acf3_46b0d15e3dc6;\nCREATE EXTERNAL TABLE IF NOT EXISTS kylin_intermediate_test_kylin_cube_with_slr_desc_19700101000000_20140731160000_c143e0e4_ac5f_434d_acf3_46b0d15e3dc6\n(\nCAL_DT date\n,LEAF_CATEG_ID int\n,LSTG_SITE_ID int\n,META_CATEG_NAME string\n,CATEG_LVL2_NAME string\n,CATEG_LVL3_NAME string\n,LSTG_FORMAT_NAME string\n,SLR_SEGMENT_ [...]
+         "interrupt_cmd":null,
+         "exec_start_time":0,
+         "exec_end_time":0,
+         "exec_wait_time":0,
+         "step_status":"PENDING",
+         "cmd_type":"SHELL_CMD_HADOOP",
+         "info":null,
+         "run_async":false
+      },
+      {  
+         "interruptCmd":null,
+         "name":"Extract Fact Table Distinct Columns",
+         "sequence_id":1,
+         "exec_cmd":" -conf C:/kylin/Kylin/server/src/main/resources/hadoop_job_conf_medium.xml -cubename test_kylin_cube_with_slr_empty -input /tmp/kylin-c143e0e4-ac5f-434d-acf3-46b0d15e3dc6/kylin_intermediate_test_kylin_cube_with_slr_desc_19700101000000_20140731160000_c143e0e4_ac5f_434d_acf3_46b0d15e3dc6 -output /tmp/kylin-c143e0e4-ac5f-434d-acf3-46b0d15e3dc6/test_kylin_cube_with_slr_empty/fact_distinct_columns -jobname Kylin_Fact_Distinct_Columns_test_kylin_cube_with_slr_empty_Step_1",
+         "interrupt_cmd":null,
+         "exec_start_time":0,
+         "exec_end_time":0,
+         "exec_wait_time":0,
+         "step_status":"PENDING",
+         "cmd_type":"JAVA_CMD_HADOOP_FACTDISTINCT",
+         "info":null,
+         "run_async":true
+      },
+      {  
+         "interruptCmd":null,
+         "name":"Load HFile to HBase Table",
+         "sequence_id":12,
+         "exec_cmd":" -input /tmp/kylin-c143e0e4-ac5f-434d-acf3-46b0d15e3dc6/test_kylin_cube_with_slr_empty/hfile/ -htablename KYLIN-CUBE-TEST_KYLIN_CUBE_WITH_SLR_EMPTY-19700101000000_20140731160000_11BB4326-5975-4358-804C-70D53642E03A -cubename test_kylin_cube_with_slr_empty",
+         "interrupt_cmd":null,
+         "exec_start_time":0,
+         "exec_end_time":0,
+         "exec_wait_time":0,
+         "step_status":"PENDING",
+         "cmd_type":"JAVA_CMD_HADOOP_NO_MR_BULKLOAD",
+         "info":null,
+         "run_async":false
+      }
+   ],
+   "job_status":"PENDING",
+   "progress":0.0
+}
+```
+
+## Enable Cube
+`PUT /kylin/api/cubes/{cubeName}/enable`
+
+#### Path variable
+* cubeName - `required` `string` Cube name.
+
+#### Response Sample
+```sh
+{  
+   "uuid":"1eaca32a-a33e-4b69-83dd-0bb8b1f8c53b",
+   "last_modified":1407909046305,
+   "name":"test_kylin_cube_with_slr_ready",
+   "owner":null,
+   "version":null,
+   "descriptor":"test_kylin_cube_with_slr_desc",
+   "cost":50,
+   "status":"ACTIVE",
+   "segments":[  
+      {  
+         "name":"19700101000000_20140531160000",
+         "storage_location_identifier":"KYLIN-CUBE-TEST_KYLIN_CUBE_WITH_SLR_READY-19700101000000_20140531160000_BF043D2D-9A4A-45E9-AA59-5A17D3F34A50",
+         "date_range_start":0,
+         "date_range_end":1401552000000,
+         "status":"READY",
+         "size_kb":4758,
+         "source_records":6000,
+         "source_records_size":620356,
+         "last_build_time":1407832663227,
+         "last_build_job_id":"2c7a2b63-b052-4a51-8b09-0c24b5792cda",
+         "binary_signature":null,
+         "dictionaries":{  
+            "TEST_CATEGORY_GROUPINGS/CATEG_LVL2_NAME":"/dict/TEST_CATEGORY_GROUPINGS/CATEG_LVL2_NAME/16d8185c-ee6b-4f8c-a919-756d9809f937.dict",
+            "TEST_KYLIN_FACT/LSTG_SITE_ID":"/dict/TEST_SITES/SITE_ID/0bec6bb3-1b0d-469c-8289-b8c4ca5d5001.dict",
+            "TEST_KYLIN_FACT/SLR_SEGMENT_CD":"/dict/TEST_SELLER_TYPE_DIM/SELLER_TYPE_CD/0c5d77ec-316b-47e0-ba9a-0616be890ad6.dict",
+            "TEST_KYLIN_FACT/CAL_DT":"/dict/PREDEFINED/date(yyyy-mm-dd)/64ac4f82-f2af-476e-85b9-f0805001014e.dict",
+            "TEST_CATEGORY_GROUPINGS/CATEG_LVL3_NAME":"/dict/TEST_CATEGORY_GROUPINGS/CATEG_LVL3_NAME/270fbfb0-281c-4602-8413-2970a7439c47.dict",
+            "TEST_KYLIN_FACT/LEAF_CATEG_ID":"/dict/TEST_CATEGORY_GROUPINGS/LEAF_CATEG_ID/2602386c-debb-4968-8d2f-b52b8215e385.dict",
+            "TEST_CATEGORY_GROUPINGS/META_CATEG_NAME":"/dict/TEST_CATEGORY_GROUPINGS/META_CATEG_NAME/0410d2c4-4686-40bc-ba14-170042a2de94.dict"
+         },
+         "snapshots":{  
+            "TEST_CAL_DT":"/table_snapshot/TEST_CAL_DT.csv/8f7cfc8a-020d-4019-b419-3c6deb0ffaa0.snapshot",
+            "TEST_SELLER_TYPE_DIM":"/table_snapshot/TEST_SELLER_TYPE_DIM.csv/c60fd05e-ac94-4016-9255-96521b273b81.snapshot",
+            "TEST_CATEGORY_GROUPINGS":"/table_snapshot/TEST_CATEGORY_GROUPINGS.csv/363f4a59-b725-4459-826d-3188bde6a971.snapshot",
+            "TEST_SITES":"/table_snapshot/TEST_SITES.csv/78e0aecc-3ec6-4406-b86e-bac4b10ea63b.snapshot"
+         }
+      }
+   ],
+   "create_time":null,
+   "source_records_count":6000,
+   "source_records_size":0,
+   "size_kb":4758
+}
+```
+
+## Disable Cube
+`PUT /kylin/api/cubes/{cubeName}/disable`
+
+#### Path variable
+* cubeName - `required` `string` Cube name.
+
+#### Response Sample
+(Same as "Enable Cube")
+
+## Purge Cube
+`PUT /kylin/api/cubes/{cubeName}/purge`
+
+#### Path variable
+* cubeName - `required` `string` Cube name.
+
+#### Response Sample
+(Same as "Enable Cube")
+
+
+## Delete Segment
+`DELETE /kylin/api/cubes/{cubeName}/segs/{segmentName}`
+
+***
+
+## Resume Job
+`PUT /kylin/api/jobs/{jobId}/resume`
+
+#### Path variable
+* jobId - `required` `string` Job id.
+
+#### Response Sample
+```
+{  
+   "uuid":"c143e0e4-ac5f-434d-acf3-46b0d15e3dc6",
+   "last_modified":1407908916705,
+   "name":"test_kylin_cube_with_slr_empty - 19700101000000_20140731160000 - BUILD - PDT 2014-08-12 22:48:36",
+   "type":"BUILD",
+   "duration":0,
+   "related_cube":"test_kylin_cube_with_slr_empty",
+   "related_segment":"19700101000000_20140731160000",
+   "exec_start_time":0,
+   "exec_end_time":0,
+   "mr_waiting":0,
+   "steps":[  
+      {  
+         "interruptCmd":null,
+         "name":"Create Intermediate Flat Hive Table",
+         "sequence_id":0,
+         "exec_cmd":"hive -e \"DROP TABLE IF EXISTS kylin_intermediate_test_kylin_cube_with_slr_desc_19700101000000_20140731160000_c143e0e4_ac5f_434d_acf3_46b0d15e3dc6;\nCREATE EXTERNAL TABLE IF NOT EXISTS kylin_intermediate_test_kylin_cube_with_slr_desc_19700101000000_20140731160000_c143e0e4_ac5f_434d_acf3_46b0d15e3dc6\n(\nCAL_DT date\n,LEAF_CATEG_ID int\n,LSTG_SITE_ID int\n,META_CATEG_NAME string\n,CATEG_LVL2_NAME string\n,CATEG_LVL3_NAME string\n,LSTG_FORMAT_NAME string\n,SLR_SEGMENT_ [...]
+         "interrupt_cmd":null,
+         "exec_start_time":0,
+         "exec_end_time":0,
+         "exec_wait_time":0,
+         "step_status":"PENDING",
+         "cmd_type":"SHELL_CMD_HADOOP",
+         "info":null,
+         "run_async":false
+      },
+      {  
+         "interruptCmd":null,
+         "name":"Extract Fact Table Distinct Columns",
+         "sequence_id":1,
+         "exec_cmd":" -conf C:/kylin/Kylin/server/src/main/resources/hadoop_job_conf_medium.xml -cubename test_kylin_cube_with_slr_empty -input /tmp/kylin-c143e0e4-ac5f-434d-acf3-46b0d15e3dc6/kylin_intermediate_test_kylin_cube_with_slr_desc_19700101000000_20140731160000_c143e0e4_ac5f_434d_acf3_46b0d15e3dc6 -output /tmp/kylin-c143e0e4-ac5f-434d-acf3-46b0d15e3dc6/test_kylin_cube_with_slr_empty/fact_distinct_columns -jobname Kylin_Fact_Distinct_Columns_test_kylin_cube_with_slr_empty_Step_1",
+         "interrupt_cmd":null,
+         "exec_start_time":0,
+         "exec_end_time":0,
+         "exec_wait_time":0,
+         "step_status":"PENDING",
+         "cmd_type":"JAVA_CMD_HADOOP_FACTDISTINCT",
+         "info":null,
+         "run_async":true
+      },
+      {  
+         "interruptCmd":null,
+         "name":"Load HFile to HBase Table",
+         "sequence_id":12,
+         "exec_cmd":" -input /tmp/kylin-c143e0e4-ac5f-434d-acf3-46b0d15e3dc6/test_kylin_cube_with_slr_empty/hfile/ -htablename KYLIN-CUBE-TEST_KYLIN_CUBE_WITH_SLR_EMPTY-19700101000000_20140731160000_11BB4326-5975-4358-804C-70D53642E03A -cubename test_kylin_cube_with_slr_empty",
+         "interrupt_cmd":null,
+         "exec_start_time":0,
+         "exec_end_time":0,
+         "exec_wait_time":0,
+         "step_status":"PENDING",
+         "cmd_type":"JAVA_CMD_HADOOP_NO_MR_BULKLOAD",
+         "info":null,
+         "run_async":false
+      }
+   ],
+   "job_status":"PENDING",
+   "progress":0.0
+}
+```
+## Pause Job
+`PUT /kylin/api/jobs/{jobId}/pause`
+
+#### Path variable
+* jobId - `required` `string` Job id.
+
+## Discard Job
+`PUT /kylin/api/jobs/{jobId}/cancel`
+
+#### Path variable
+* jobId - `required` `string` Job id.
+
+## Get Job Status
+`GET /kylin/api/jobs/{jobId}`
+
+#### Path variable
+* jobId - `required` `string` Job id.
+
+#### Response Sample
+(Same as "Resume Job")
+
+## Get job step output
+`GET /kylin/api/jobs/{jobId}/steps/{stepId}/output`
+
+#### Path Variable
+* jobId - `required` `string` Job id.
+* stepId - `required` `string` Step id; the step id is composed by jobId with step sequence id; for example, the jobId is "fb479e54-837f-49a2-b457-651fc50be110", its 3rd step id is "fb479e54-837f-49a2-b457-651fc50be110-3", 
+
+#### Response Sample
+```
+{  
+   "cmd_output":"log string"
+}
+```
+
+## Get job list
+`GET /kylin/api/jobs`
+
+#### Request Variables
+* cubeName - `optional` `string` Cube name.
+* projectName - `required` `string` Project name.
+* status - `optional` `int` Job status, e.g. (NEW: 0, PENDING: 1, RUNNING: 2, STOPPED: 32, FINISHED: 4, ERROR: 8, DISCARDED: 16)
+* offset - `required` `int` Offset used by pagination.
+* limit - `required` `int` Jobs per page.
+* timeFilter - `required` `int`, e.g. (LAST ONE DAY: 0, LAST ONE WEEK: 1, LAST ONE MONTH: 2, LAST ONE YEAR: 3, ALL: 4)
+
+For example, to get the job list in project 'learn_kylin' for cube 'kylin_sales_cube' in lastone week: 
+
+`GET: /kylin/api/jobs?cubeName=kylin_sales_cube&limit=15&offset=0&projectName=learn_kylin&timeFilter=1`
+
+
+#### Response Sample
+```
+[
+  { 
+    "uuid": "9eb7bccf-4448-4578-9c29-552658b5a2ca", 
+    "last_modified": 1490957579843, 
+    "version": "2.0.0", 
+    "name": "Sample_Cube - 19700101000000_20150101000000 - BUILD - GMT+08:00 2017-03-31 18:36:08", 
+    "type": "BUILD", 
+    "duration": 936, 
+    "related_cube": "Sample_Cube", 
+    "related_segment": "53a5d7f7-7e06-4ea1-b3ee-b7f30343c723", 
+    "exec_start_time": 1490956581743, 
+    "exec_end_time": 1490957518131, 
+    "mr_waiting": 0, 
+    "steps": [
+      { 
+        "interruptCmd": null, 
+        "id": "9eb7bccf-4448-4578-9c29-552658b5a2ca-00", 
+        "name": "Create Intermediate Flat Hive Table", 
+        "sequence_id": 0, 
+        "exec_cmd": null, 
+        "interrupt_cmd": null, 
+        "exec_start_time": 1490957508721, 
+        "exec_end_time": 1490957518102, 
+        "exec_wait_time": 0, 
+        "step_status": "DISCARDED", 
+        "cmd_type": "SHELL_CMD_HADOOP", 
+        "info": { "endTime": "1490957518102", "startTime": "1490957508721" }, 
+        "run_async": false 
+      }, 
+      { 
+        "interruptCmd": null, 
+        "id": "9eb7bccf-4448-4578-9c29-552658b5a2ca-01", 
+        "name": "Redistribute Flat Hive Table", 
+        "sequence_id": 1, 
+        "exec_cmd": null, 
+        "interrupt_cmd": null, 
+        "exec_start_time": 0, 
+        "exec_end_time": 0, 
+        "exec_wait_time": 0, 
+        "step_status": "DISCARDED", 
+        "cmd_type": "SHELL_CMD_HADOOP", 
+        "info": {}, 
+        "run_async": false 
+      }
+    ],
+    "submitter": "ADMIN", 
+    "job_status": "FINISHED", 
+    "progress": 100.0 
+  }
+]
+```
+***
+
+## Get Hive Table
+`GET /kylin/api/tables/{project}/{tableName}`
+
+#### Path Parameters
+* project - `required` `string` project name
+* tableName - `required` `string` table name to find.
+
+#### Response Sample
+```sh
+{
+    uuid: "69cc92c0-fc42-4bb9-893f-bd1141c91dbe",
+    name: "SAMPLE_07",
+    columns: [{
+        id: "1",
+        name: "CODE",
+        datatype: "string"
+    }, {
+        id: "2",
+        name: "DESCRIPTION",
+        datatype: "string"
+    }, {
+        id: "3",
+        name: "TOTAL_EMP",
+        datatype: "int"
+    }, {
+        id: "4",
+        name: "SALARY",
+        datatype: "int"
+    }],
+    database: "DEFAULT",
+    last_modified: 1419330476755
+}
+```
+
+## Get Hive Tables
+`GET /kylin/api/tables`
+
+#### Request Parameters
+* project- `required` `string` will list all tables in the project.
+* ext- `optional` `boolean`  set true to get extend info of table.
+
+#### Response Sample
+```sh
+[
+ {
+    uuid: "53856c96-fe4d-459e-a9dc-c339b1bc3310",
+    name: "SAMPLE_08",
+    columns: [{
+        id: "1",
+        name: "CODE",
+        datatype: "string"
+    }, {
+        id: "2",
+        name: "DESCRIPTION",
+        datatype: "string"
+    }, {
+        id: "3",
+        name: "TOTAL_EMP",
+        datatype: "int"
+    }, {
+        id: "4",
+        name: "SALARY",
+        datatype: "int"
+    }],
+    database: "DEFAULT",
+    cardinality: {},
+    last_modified: 0,
+    exd: {
+        minFileSize: "46069",
+        totalNumberFiles: "1",
+        location: "hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse/sample_08",
+        lastAccessTime: "1398176495945",
+        lastUpdateTime: "1398176495981",
+        columns: "struct columns { string code, string description, i32 total_emp, i32 salary}",
+        partitionColumns: "",
+        EXD_STATUS: "true",
+        maxFileSize: "46069",
+        inputformat: "org.apache.hadoop.mapred.TextInputFormat",
+        partitioned: "false",
+        tableName: "sample_08",
+        owner: "hue",
+        totalFileSize: "46069",
+        outputformat: "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"
+    }
+  }
+]
+```
+
+## Load Hive Tables
+`POST /kylin/api/tables/{tables}/{project}`
+
+#### Request Parameters
+* tables - `required` `string` table names you want to load from hive, separated with comma.
+* project - `required` `String`  the project which the tables will be loaded into.
+
+#### Response Sample
+```
+{
+    "result.loaded": ["DEFAULT.SAMPLE_07"],
+    "result.unloaded": ["sapmle_08"]
+}
+```
+
+***
+
+## Wipe cache
+`PUT /kylin/api/cache/{type}/{name}/{action}`
+
+#### Path variable
+* type - `required` `string` 'METADATA' or 'CUBE'
+* name - `required` `string` Cache key, e.g the cube name.
+* action - `required` `string` 'create', 'update' or 'drop'
+
+***
+
+## Initiate cube start position
+Set the stream cube's start position to the current latest offsets; This can avoid building from the earlist position of Kafka topic (if you have set a long retension time); 
+
+`PUT /kylin/api/cubes/{cubeName}/init_start_offsets`
+
+#### Path variable
+* cubeName - `required` `string` Cube name
+
+#### Response Sample
+```sh
+{
+    "result": "success", 
+    "offsets": "{0=246059529, 1=253547684, 2=253023895, 3=172996803, 4=165503476, 5=173513896, 6=19200473, 7=26691891, 8=26699895, 9=26694021, 10=19204164, 11=26694597}"
+}
+```
+
+## Build stream cube
+`PUT /kylin/api/cubes/{cubeName}/build2`
+
+This API is specific for stream cube's building;
+
+#### Path variable
+* cubeName - `required` `string` Cube name
+
+#### Request Body
+
+* sourceOffsetStart - `required` `long` The start offset, 0 represents from previous position;
+* sourceOffsetEnd  - `required` `long` The end offset, 9223372036854775807 represents to the end position of current stream data
+* buildType - `required` Build type, "BUILD", "MERGE" or "REFRESH"
+
+#### Request Sample
+
+```sh
+{  
+   "sourceOffsetStart": 0, 
+   "sourceOffsetEnd": 9223372036854775807, 
+   "buildType": "BUILD"
+}
+```
+
+#### Response Sample
+```sh
+{
+    "uuid": "3afd6e75-f921-41e1-8c68-cb60bc72a601", 
+    "last_modified": 1480402541240, 
+    "version": "1.6.0", 
+    "name": "embedded_cube_clone - 1409830324_1409849348 - BUILD - PST 2016-11-28 22:55:41", 
+    "type": "BUILD", 
+    "duration": 0, 
+    "related_cube": "embedded_cube_clone", 
+    "related_segment": "42ebcdea-cbe9-4905-84db-31cb25f11515", 
+    "exec_start_time": 0, 
+    "exec_end_time": 0, 
+    "mr_waiting": 0, 
+ ...
+}
+```
+
+## Check segment holes
+`GET /kylin/api/cubes/{cubeName}/holes`
+
+#### Path variable
+* cubeName - `required` `string` Cube name
+
+## Fill segment holes
+`PUT /kylin/api/cubes/{cubeName}/holes`
+
+#### Path variable
+* cubeName - `required` `string` Cube name
+
+
+
+## Use RESTful API in Javascript
+
+Keypoints of call Kylin RESTful API in web page are:
+
+1. Add basic access authorization info in http headers.
+
+2. Use proper request type and data synax.
+
+Kylin security is based on basic access authorization, if you want to use API in your javascript, you need to add authorization info in http headers; for example:
+
+```
+$.ajaxSetup({
+      headers: { 'Authorization': "Basic eWFu**********X***ZA==", 'Content-Type': 'application/json;charset=utf-8' } // use your own authorization code here
+    });
+    var request = $.ajax({
+       url: "http://hostname/kylin/api/query",
+       type: "POST",
+       data: '{"sql":"select count(*) from SUMMARY;","offset":0,"limit":50000,"acceptPartial":true,"project":"test"}',
+       dataType: "json"
+    });
+    request.done(function( msg ) {
+       alert(msg);
+    }); 
+    request.fail(function( jqXHR, textStatus ) {
+       alert( "Request failed: " + textStatus );
+  });
+
+```
+
+To generate your authorization code, download and import "jquery.base64.js" from [https://github.com/yckart/jquery.base64.js](https://github.com/yckart/jquery.base64.js)).
+
+```
+var authorizationCode = $.base64('encode', 'NT_USERNAME' + ":" + 'NT_PASSWORD');
+
+$.ajaxSetup({
+   headers: { 
+    'Authorization': "Basic " + authorizationCode, 
+    'Content-Type': 'application/json;charset=utf-8' 
+   }
+});
+```
diff --git a/website/_docs23/index.cn.md b/website/_docs23/index.cn.md
index 37a30be..ab7e22e 100644
--- a/website/_docs23/index.cn.md
+++ b/website/_docs23/index.cn.md
@@ -16,7 +16,7 @@ Apache Kylin™是一个开源的分布式分析引擎,提供Hadoop之上的SQ
 * [v2.1.x and v2.2.x document](/cn/docs21/)
 * [v2.0.x document](/cn/docs20/)
 * [v1.6.x document](/cn/docs16/)
-* [v1.5.x document](/cn/docs15/)
+* [归档](/archive/)
 
 安装 
 ------------  
diff --git a/website/_docs23/index.md b/website/_docs23/index.md
index 390990a..3ba0811 100644
--- a/website/_docs23/index.md
+++ b/website/_docs23/index.md
@@ -16,7 +16,7 @@ Document of prior versions:
 * [v2.1.x and v2.2.x document](/docs21/)
 * [v2.0.x document](/docs20/)
 * [v1.6.x document](/docs16/)
-* [v1.5.x document](/docs15/)
+* [Archive](/archive/)
 
 
 Installation & Setup
diff --git a/website/_docs23/install/advance_settings.cn.md b/website/_docs23/install/advance_settings.cn.md
index 4bfc13b..b1a792d 100644
--- a/website/_docs23/install/advance_settings.cn.md
+++ b/website/_docs23/install/advance_settings.cn.md
@@ -1,8 +1,8 @@
 ---
-layout:docs23
-title: "高级设置"
-categories:install
-permalink:/cn/docs23/install/advance_settings.html
+layout: docs23-cn
+title: "高级设置"
+categories: install
+permalink: /cn/docs23/install/advance_settings.html
 ---
 
 ## 在 Cube 级别重写默认的 kylin.properties
@@ -80,6 +80,17 @@ export KYLIN_JVM_SETTINGS="-Xms1024M -Xmx4096M -Xss1024K -XX:MaxPermSize=128M -v
 # export KYLIN_JVM_SETTINGS="-Xms16g -Xmx16g -XX:MaxPermSize=512m -XX:NewSize=3g -XX:MaxNewSize=3g -XX:SurvivorRatio=4 -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:CMSInitiatingOccupancyFraction=70 -XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError"
 {% endhighlight %}
 
+## 启用多个任务引擎
+从 2.0 开始, Kylin 支持多个任务引擎一起运行,相比于默认单任务引擎的配置,多引擎可以保证任务构建的高可用。
+
+使用多任务引擎,你可以在多个 Kylin 节点上配置它的角色为 `job` 或 `all`。为了避免它们之间产生竞争,需要启用分布式任务锁,请在 `kylin.properties` 里配置:
+
+```
+kylin.job.scheduler.default=2
+kylin.job.lock=org.apache.kylin.storage.hbase.util.ZookeeperDistributedJobLock
+```
+并记得将所有任务和查询节点的地址注册到 `kylin.server.cluster-servers`.
+
 ## 支持 LDAP 或 SSO authentication
 
 查看 [How to Enable Security with LDAP and SSO](../howto/howto_ldap_and_sso.html)
diff --git a/website/_docs23/install/advance_settings.md b/website/_docs23/install/advance_settings.md
index ea80bb0..04b9dfa 100644
--- a/website/_docs23/install/advance_settings.md
+++ b/website/_docs23/install/advance_settings.md
@@ -80,6 +80,17 @@ export KYLIN_JVM_SETTINGS="-Xms1024M -Xmx4096M -Xss1024K -XX:MaxPermSize=128M -v
 # export KYLIN_JVM_SETTINGS="-Xms16g -Xmx16g -XX:MaxPermSize=512m -XX:NewSize=3g -XX:MaxNewSize=3g -XX:SurvivorRatio=4 -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:CMSInitiatingOccupancyFraction=70 -XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError"
 {% endhighlight %}
 
+## Enable multiple job engines (HA)
+Since Kylin 2.0, Kylin support multiple job engines running together, which is more extensible, available and reliable than the default job scheduler.
+
+To enable the distributed job scheduler, you need to set or update the configs in the kylin.properties:
+
+```
+kylin.job.scheduler.default=2
+kylin.job.lock=org.apache.kylin.storage.hbase.util.ZookeeperDistributedJobLock
+```
+Please add all job servers and query servers to the `kylin.server.cluster-servers`.
+
 ## Enable LDAP or SSO authentication
 
 Check [How to Enable Security with LDAP and SSO](../howto/howto_ldap_and_sso.html)
diff --git a/website/_docs23/install/configuration.cn.md b/website/_docs23/install/configuration.cn.md
index c76fa52..06bbde1 100644
--- a/website/_docs23/install/configuration.cn.md
+++ b/website/_docs23/install/configuration.cn.md
@@ -1,5 +1,5 @@
 ---
-layout: docs23
+layout: docs23-cn
 title:  "Kylin 配置"
 categories: install
 permalink: /cn/docs23/install/configuration.html
diff --git a/website/_docs23/install/index.cn.md b/website/_docs23/install/index.cn.md
index d7c2e28..2b75c3b 100644
--- a/website/_docs23/install/index.cn.md
+++ b/website/_docs23/install/index.cn.md
@@ -1,5 +1,5 @@
 ---
-layout: docs23
+layout: docs23-cn
 title:  "安装指南"
 categories: install
 permalink: /cn/docs23/install/index.html
diff --git a/website/_docs23/install/kylin_aws_emr.cn.md b/website/_docs23/install/kylin_aws_emr.cn.md
index ae84596..a7b5274 100644
--- a/website/_docs23/install/kylin_aws_emr.cn.md
+++ b/website/_docs23/install/kylin_aws_emr.cn.md
@@ -1,5 +1,5 @@
 ---
-layout: docs23
+layout: docs23-cn
 title:  "在 AWS EMR 上 安装 Kylin"
 categories: install
 permalink: /cn/docs23/install/kylin_aws_emr.html
diff --git a/website/_docs23/install/kylin_cluster.cn.md b/website/_docs23/install/kylin_cluster.cn.md
index 23a0cd3..9250e95 100644
--- a/website/_docs23/install/kylin_cluster.cn.md
+++ b/website/_docs23/install/kylin_cluster.cn.md
@@ -1,5 +1,5 @@
 ---
-layout: docs23
+layout: docs23-cn
 title:  "Cluster 模式下部署"
 categories: install
 permalink: /cn/docs23/install/kylin_cluster.html
diff --git a/website/_docs23/install/kylin_docker.cn.md b/website/_docs23/install/kylin_docker.cn.md
index 505abf8..3a9aab1 100644
--- a/website/_docs23/install/kylin_docker.cn.md
+++ b/website/_docs23/install/kylin_docker.cn.md
@@ -1,5 +1,5 @@
 ---
-layout: docs23
+layout: docs23-cn
 title:  "用 Docker 运行 Kylin"
 categories: install
 permalink: /cn/docs23/install/kylin_docker.html
diff --git a/website/_docs23/tutorial/cube_build_job.cn.md b/website/_docs23/tutorial/cube_build_job.cn.md
index 270c4da..126ca55 100644
--- a/website/_docs23/tutorial/cube_build_job.cn.md
+++ b/website/_docs23/tutorial/cube_build_job.cn.md
@@ -1,6 +1,6 @@
 ---
 layout: docs23-cn
-title: Cube 构建和 Job 监控
+title: "Cube 构建和 Job 监控"
 categories: 教程
 permalink: /cn/docs23/tutorial/cube_build_job.html
 version: v1.2
diff --git a/website/_docs23/tutorial/cube_build_performance.cn.md b/website/_docs23/tutorial/cube_build_performance.cn.md
index 10bf138..39d46fb 100644
--- a/website/_docs23/tutorial/cube_build_performance.cn.md
+++ b/website/_docs23/tutorial/cube_build_performance.cn.md
@@ -1,8 +1,8 @@
 ---
-layout:docs23
-title:调整 Cube Build
-categories:tutorial
-permalink:/cn/docs23/tutorial/cube_build_performance.html
+layout: docs23-cn
+title: "优化 Cube 构建"
+categories: tutorial
+permalink: /cn/docs23/tutorial/cube_build_performance.html
 ---
  *本教程是关于如何一步步优化 cube build 的样例。* 
  
diff --git a/website/_docs23/tutorial/cube_spark.cn.md b/website/_docs23/tutorial/cube_spark.cn.md
index 003f8ba..ca0dd99 100644
--- a/website/_docs23/tutorial/cube_spark.cn.md
+++ b/website/_docs23/tutorial/cube_spark.cn.md
@@ -1,6 +1,6 @@
 ---
-layout: docs23
-title:  用 Spark 构建 Cube
+layout: docs23-cn
+title:  "用 Spark 构建 Cube"
 categories: tutorial
 permalink: /cn/docs23/tutorial/cube_spark.html
 ---
diff --git a/website/_docs23/tutorial/cube_streaming.cn.md b/website/_docs23/tutorial/cube_streaming.cn.md
index 5a2e857..cf094e9 100644
--- a/website/_docs23/tutorial/cube_streaming.cn.md
+++ b/website/_docs23/tutorial/cube_streaming.cn.md
@@ -1,6 +1,6 @@
 ---
-layout: docs23
-title:  Kafka 的可拓展 Cubing
+layout: docs23-cn
+title:  "从 Kafka 流构建 Cube"
 categories: tutorial
 permalink: /cn/docs23/tutorial/cube_streaming.html
 ---
diff --git a/website/_docs23/tutorial/jdbc.cn.md b/website/_docs23/tutorial/jdbc.cn.md
index 5663cfc..22fac45 100644
--- a/website/_docs23/tutorial/jdbc.cn.md
+++ b/website/_docs23/tutorial/jdbc.cn.md
@@ -1,6 +1,6 @@
 ---
 layout: docs23-cn
-title:  Kylin JDBC Driver
+title:  "JDBC 驱动"
 categories: 教程
 permalink: /cn/docs23/tutorial/jdbc.html
 ---
diff --git a/website/_docs23/tutorial/kylin_client_tool.cn.md b/website/_docs23/tutorial/kylin_client_tool.cn.md
index df2754a..6553d4e 100644
--- a/website/_docs23/tutorial/kylin_client_tool.cn.md
+++ b/website/_docs23/tutorial/kylin_client_tool.cn.md
@@ -1,6 +1,6 @@
 ---
 layout: docs23-cn
-title:  Python 客户端工具库
+title:  "Python 客户端"
 categories: 教程
 permalink: /cn/docs23/tutorial/kylin_client_tool.html
 ---
diff --git a/website/_docs23/tutorial/kylin_sample.cn.md b/website/_docs23/tutorial/kylin_sample.cn.md
index cc9bb7b..992ee16 100644
--- a/website/_docs23/tutorial/kylin_sample.cn.md
+++ b/website/_docs23/tutorial/kylin_sample.cn.md
@@ -1,6 +1,6 @@
 ---
-layout: docs23
-title:  样例 Cube 快速入门
+layout: docs23-cn
+title:  "样例 Cube 快速入门"
 categories: tutorial
 permalink: /cn/docs23/tutorial/kylin_sample.html
 ---
diff --git a/website/_docs23/tutorial/odbc.cn.md b/website/_docs23/tutorial/odbc.cn.md
index 6515bfc..cbfe1d5 100644
--- a/website/_docs23/tutorial/odbc.cn.md
+++ b/website/_docs23/tutorial/odbc.cn.md
@@ -1,6 +1,6 @@
 ---
 layout: docs23-cn
-title:  ODBC 驱动程序
+title:  "ODBC 驱动"
 categories: 教程
 permalink: /cn/docs23/tutorial/odbc.html
 version: v1.2
diff --git a/website/_docs23/tutorial/powerbi.cn.md b/website/_docs23/tutorial/powerbi.cn.md
index 2dd3223..b73cca2 100644
--- a/website/_docs23/tutorial/powerbi.cn.md
+++ b/website/_docs23/tutorial/powerbi.cn.md
@@ -1,6 +1,6 @@
 ---
 layout: docs23-cn
-title:  MS Excel及Power BI教程
+title:  "Excel 及 Power BI 教程"
 categories: tutorial
 permalink: /cn/docs23/tutorial/powerbi.html
 version: v1.2
diff --git a/website/_docs23/tutorial/project_level_acl.cn.md b/website/_docs23/tutorial/project_level_acl.cn.md
new file mode 100644
index 0000000..2973218
--- /dev/null
+++ b/website/_docs23/tutorial/project_level_acl.cn.md
@@ -0,0 +1,63 @@
+---
+layout: docs23-cn
+title: Project Level ACL
+categories: tutorial
+permalink: /cn/docs23/tutorial/project_level_acl.html
+since: v2.1.0
+---
+
+Whether a user can access a project and use some functionalities within the project is determined by project-level access control, there are four types of access permission role set at the project-level in Apache Kylin. They are *ADMIN*, *MANAGEMENT*, *OPERATION* and *QUERY*. Each role defines a list of functionality user may perform in Apache Kylin.
+
+- *QUERY*: designed to be used by analysts who only need access permission to query tables/cubes in the project.
+- *OPERATION*: designed to be used by operation team in a corporate/organization who need permission to maintain the Cube. OPERATION access permission includes QUERY.
+- *MANAGEMENT*: designed to be used by Modeler or Designer who is fully knowledgeable of business meaning of the data/model, Cube will be in charge of Model and Cube design. MANAGEMENT access permission includes OPERATION, and QUERY.
+- *ADMIN*: Designed to fully manage the project. ADMIN access permission includes MANAGEMENT, OPERATION and QUERY.
+
+Access permissions are independent between different projects.
+
+### How Access Permission is Determined
+
+Once project-level access permission has been set for a user, access permission on data source, model and Cube will be inherited based on the access permission role defined on project-level. For detailed functionalities, each access permission role can have access to, see table below.
+
+|                                          | System Admin | Project Admin | Management | Operation | Query |
+| ---------------------------------------- | ------------ | ------------- | ---------- | --------- | ----- |
+| Create/delete project                    | Yes          | No            | No         | No        | No    |
+| Edit project                             | Yes          | Yes           | No         | No        | No    |
+| Add/edit/delete project access permission | Yes          | Yes           | No         | No        | No    |
+| Check model page                         | Yes          | Yes           | Yes        | Yes       | Yes   |
+| Check data source page                   | Yes          | Yes           | Yes        | No        | No    |
+| Load, unload table, reload table         | Yes          | Yes           | No         | No        | No    |
+| View model in read only mode             | Yes          | Yes           | Yes        | Yes       | Yes   |
+| Add, edit, clone, drop model             | Yes          | Yes           | Yes        | No        | No    |
+| Check cube detail definition             | Yes          | Yes           | Yes        | Yes       | Yes   |
+| Add, disable/enable, clone cube, edit, drop cube, purge cube | Yes          | Yes           | Yes        | No        | No    |
+| Build, refresh, merge cube               | Yes          | Yes           | Yes        | Yes       | No    |
+| Edit, view cube json                     | Yes          | Yes           | Yes        | No        | No    |
+| Check insight page                       | Yes          | Yes           | Yes        | Yes       | Yes   |
+| View table in insight page               | Yes          | Yes           | Yes        | Yes       | Yes   |
+| Check monitor page                       | Yes          | Yes           | Yes        | Yes       | No    |
+| Check system page                        | Yes          | No            | No         | No        | No    |
+| Reload metadata, disable cache, set config, diagnosis | Yes          | No            | No         | No        | No    |
+
+
+Additionally, when Query Pushdown is enabled, QUERY access permission on a project allows users to issue push down queries on all tables in the project even though no cube could serve them. It's impossible if a user is not yet granted QUERY permission at project-level.
+
+### Manage Access Permission at Project-level
+
+1. Click the small gear shape icon on the top-left corner of Model page. You will be redirected to project page
+
+   ![](/images/Project-level-acl/ACL-1.png)
+
+2. In project page, expand a project and choose Access.
+3. Click `Grant`to grant permission to user.
+
+	![](/images/Project-level-acl/ACL-2.png)
+
+4. Fill in name of the user or role, choose permission and then click `Grant` to grant permission.
+
+5. You can also revoke and update permission on this page.
+
+   ![](/images/Project-level-acl/ACL-3.png)
+
+   Please note that in order to grant permission to default user (MODELER and ANLAYST), these users need to login as least once. 
+   ​
diff --git a/website/_docs23/tutorial/setup_jdbc_datasource.cn.md b/website/_docs23/tutorial/setup_jdbc_datasource.cn.md
index 1d5f84d..a2779bc 100644
--- a/website/_docs23/tutorial/setup_jdbc_datasource.cn.md
+++ b/website/_docs23/tutorial/setup_jdbc_datasource.cn.md
@@ -1,5 +1,5 @@
 ---
-layout: docs23
+layout: docs23-cn
 title:  建立 JDBC 数据源
 categories: howto
 permalink: /cn/docs23/tutorial/setup_jdbc_datasource.html
diff --git a/website/_docs23/tutorial/setup_systemcube.cn.md b/website/_docs23/tutorial/setup_systemcube.cn.md
index e825afb..2460ad6 100644
--- a/website/_docs23/tutorial/setup_systemcube.cn.md
+++ b/website/_docs23/tutorial/setup_systemcube.cn.md
@@ -1,5 +1,5 @@
 ---
-layout: docs23
+layout: docs23-cn
 title:  建立系统 Cube
 categories: tutorial
 permalink: /cn/docs23/tutorial/setup_systemcube.html
diff --git a/website/_docs23/tutorial/spark.cn.md b/website/_docs23/tutorial/spark.cn.md
new file mode 100644
index 0000000..3995a6c
--- /dev/null
+++ b/website/_docs23/tutorial/spark.cn.md
@@ -0,0 +1,90 @@
+---
+layout: docs23-cn
+title:  Apache Spark
+categories: tutorial
+permalink: /cn/docs23/tutorial/spark.html
+---
+
+
+### Introduction
+
+Apache Kylin provides JDBC driver to query the Cube data, and Apache Spark supports JDBC data source. With it, you can connect with Kylin from your Spark application and then do the analysis over a very huge data set in an interactive way.
+
+Please keep in mind, Kylin is an OLAP system, which already aggregated the raw data by the given dimensions. If you simply load the source table like a normal database, you may not gain the benefit of Cubes, and it may crash your application.
+
+The right way is to start from a summarized view (e.g., a query with "group by"), loading it as a data frame, and then do the transformation and other actions.
+
+This document describes how to use Kylin as a data source in Apache Spark. You need to install Kylin, build a Cube before run it. And remember to put Kylin's JDBC driver (in the 'lib' folder of Kylin binary package) onto Spark's class path. 
+
+### The wrong way
+
+The below Python application tries to directly load Kylin's table as a data frame, and then to get the total row count with "df.count()", but the result is incorrect.
+
+{% highlight Groff markup %}
+
+conf = SparkConf() 
+conf.setMaster('yarn')
+conf.setAppName('Kylin jdbc example')
+
+sc = SparkContext(conf=conf)
+sqlContext = SQLContext(self.sc)
+
+url='jdbc:kylin://sandbox:7070/default'
+df = self.sqlContext.read.format('jdbc').options(
+    url=url, user='ADMIN', password='KYLIN',
+    driver='org.apache.kylin.jdbc.Driver',
+    dbtable='kylin_sales').load()
+
+print df.count()
+
+    
+{% endhighlight %}
+
+The output is:
+{% highlight Groff markup %}
+132
+
+{% endhighlight %}
+
+
+The result "132" is not the total count of the origin table. Because Spark didn't send a "select count(*)" query to Kylin as you thought, but send a "select * " and then try to count within Spark; This would be inefficient and, as Kylin doesn't have the raw data, the "select * " query will be answered with the base Cuboid (summarized by all dimensions). The "132" is the row number of the base Cuboid, not original data. 
+
+
+### The right way
+
+The right behavior is to push down possible aggregations to Kylin, so that the Cube can be leveraged and the performance would be much better. Below is the correct code:
+
+{% highlight Groff markup %}
+
+conf = SparkConf() 
+conf.setMaster('yarn')
+conf.setAppName('Kylin jdbc example')
+
+sc = SparkContext(conf=conf)
+sqlContext = SQLContext(sc)
+  
+url='jdbc:kylin://sandbox:7070/default'
+tab_name = '(select count(*) as total from kylin_sales) the_alias'
+
+df = sqlContext.read.format('jdbc').options(
+        url=url, user='ADMIN', password='KYLIN',
+        driver='org.apache.kylin.jdbc.Driver',
+        dbtable=tab_name).load()
+
+df.show()
+
+{% endhighlight %}
+
+Here is the output, the result is correct as Spark push down the aggregation to Kylin:
+
+{% highlight Groff markup %}
++-----+
+|TOTAL|
++-----+
+| 2000|
++-----+
+
+{% endhighlight %}
+
+Thanks for the input and sample code from Shuxin Yang (shuxinyang.oss@gmail.com).
+
diff --git a/website/_docs23/tutorial/squirrel.cn.md b/website/_docs23/tutorial/squirrel.cn.md
new file mode 100644
index 0000000..c9fe75a
--- /dev/null
+++ b/website/_docs23/tutorial/squirrel.cn.md
@@ -0,0 +1,112 @@
+---
+layout: docs23-cn
+title:  SQuirreL
+categories: tutorial
+permalink: /cn/docs23/tutorial/squirrel.html
+---
+
+### Introduction
+
+[SQuirreL SQL](http://www.squirrelsql.org/) is a multi platform Universal SQL Client (GNU License). You can use it to access HBase + Phoenix and Hive. This document introduces how to connect to Kylin from SQuirreL.
+
+### Used Software
+
+* [Kylin v1.6.0](/download/) & ODBC 1.6
+* [SquirreL SQL v3.7.1](http://www.squirrelsql.org/)
+
+## Pre-requisites
+
+* Find the Kylin JDBC driver jar
+  From Kylin Download, Choose Binary and the **correct version of Kylin and HBase**
+	Download & Unpack:  in **./lib**: 
+  ![](/images/SQuirreL-Tutorial/01.png)
+
+
+* Need an instance of Kylin, with a Cube; the [Sample Cube](kylin_sample.html) is enough.
+
+  ![](/images/SQuirreL-Tutorial/02.png)
+
+
+* [Dowload and install SquirreL](http://www.squirrelsql.org/#installation)
+
+## Add Kylin JDBC Driver
+
+On left menu: ![alt text](/images/SQuirreL-Tutorial/03.png) >![alt text](/images/SQuirreL-Tutorial/04.png)  > ![alt text](/images/SQuirreL-Tutorial/05.png)  > ![alt text](/images/SQuirreL-Tutorial/06.png)
+
+And locate the JAR: ![alt text](/images/SQuirreL-Tutorial/07.png)
+
+Configure this parameters:
+
+* Put a name: ![alt text](/images/SQuirreL-Tutorial/08.png)
+* Example URL ![alt text](/images/SQuirreL-Tutorial/09.png)
+
+  jdbc:kylin://172.17.0.2:7070/learn_kylin
+* Put Class Name: ![alt text](/images/SQuirreL-Tutorial/10.png)
+	Tip:  If auto complete not work, type:  org.apache.kylin.jdbc.Driver 
+	
+Check the Driver List: ![alt text](/images/SQuirreL-Tutorial/11.png)
+
+## Add Aliases
+
+On left menu: ![alt text](/images/SQuirreL-Tutorial/12.png)  > ![alt text](/images/SQuirreL-Tutorial/13.png) : (Login pass by default: ADMIN / KYLIN)
+
+  ![](/images/SQuirreL-Tutorial/14.png)
+
+
+And automatically launch conection:
+
+  ![](/images/SQuirreL-Tutorial/15.png)
+
+
+## Connect and Execute
+
+The startup window when connected:
+
+  ![](/images/SQuirreL-Tutorial/16.png)
+
+
+Choose Tab: and write a query  (whe use Kylin’s example cube):
+
+  ![](/images/SQuirreL-Tutorial/17.png)
+
+
+```
+select part_dt, sum(price) as total_selled, count(distinct seller_id) as sellers 
+from kylin_sales group by part_dt 
+order by part_dt
+```
+
+Execute With: ![alt text](/images/SQuirreL-Tutorial/18.png) 
+
+  ![](/images/SQuirreL-Tutorial/19.png)
+
+
+And it’s works!
+
+## Tips:
+
+SquirreL isn’t the most stable SQL Client, but it is very flexible and get a lot of info; It can be used for PoC and checking connectivity issues.
+
+List of tables: 
+
+  ![](/images/SQuirreL-Tutorial/21.png)
+
+
+List of columns of table:
+
+  ![](/images/SQuirreL-Tutorial/22.png)
+
+
+List of column of Querie:
+
+  ![](/images/SQuirreL-Tutorial/23.png)
+
+
+Export the result of queries:
+
+  ![](/images/SQuirreL-Tutorial/24.png)
+
+
+ Info about time query execution:
+
+  ![](/images/SQuirreL-Tutorial/25.png)
diff --git a/website/_docs23/tutorial/tableau.cn.md b/website/_docs23/tutorial/tableau.cn.md
index 8e33ac4..ac1ddea 100644
--- a/website/_docs23/tutorial/tableau.cn.md
+++ b/website/_docs23/tutorial/tableau.cn.md
@@ -1,6 +1,6 @@
 ---
 layout: docs23-cn
-title:  Tableau
+title:  Tableau 8
 categories: 教程
 permalink: /cn/docs23/tutorial/tableau.html
 version: v1.2
@@ -13,11 +13,7 @@ since: v0.7.1
 > * 请勿尝试在多个事实表或多个查找表之间进行连接;
 > * 你可以尝试使用类似Tableau过滤器中seller id这样的高基数维度,但引擎现在将只返回有限个Tableau过滤器中的seller id。
 > 
-> 如需更多详细信息或有任何问题,请联系Kylin团队:`kylinolap@gmail.com`
-
-
-### 使用Tableau 9.x的用户
-请参考[Tableau 9 教程](./tableau_91.html)以获得更详细帮助。
+> 如需更多详细信息或有任何问题,请联系Kylin团队:`dev@kylin.apache.org`
 
 ### 步骤1. 安装Kylin ODBC驱动程序
 参考页面[Kylin ODBC 驱动程序教程](./odbc.html)。
diff --git a/website/_docs23/tutorial/tableau_91.cn.md b/website/_docs23/tutorial/tableau_91.cn.md
index 9d20866..e3d5644 100644
--- a/website/_docs23/tutorial/tableau_91.cn.md
+++ b/website/_docs23/tutorial/tableau_91.cn.md
@@ -9,10 +9,6 @@ since: v1.2
 
 Tableau 9已经发布一段时间了,社区有很多用户希望Apache Kylin能进一步支持该版本。现在可以通过更新Kylin ODBC驱动以使用Tableau 9来与Kylin服务进行交互。
 
-
-### Tableau 8.x 用户
-请参考[Tableau 教程](./tableau.html)以获得更详细帮助。
-
 ### Install ODBC Driver
 参考页面[Kylin ODBC 驱动程序教程](./odbc.html),请确保下载并安装Kylin ODBC Driver __v1.5__. 如果你安装有早前版本,请卸载后再安装。 
 
diff --git a/website/_docs23/tutorial/tableau_91.md b/website/_docs23/tutorial/tableau_91.md
index 5929c0b..7c96512 100644
--- a/website/_docs23/tutorial/tableau_91.md
+++ b/website/_docs23/tutorial/tableau_91.md
@@ -7,10 +7,6 @@ permalink: /docs23/tutorial/tableau_91.html
 
 Tableau 9.x has been released a while, there are many users are asking about support this version with Apache Kylin. With updated Kylin ODBC Driver, now user could interactive with Kylin service through Tableau 9.x.
 
-
-### For Tableau 8.x User
-Please refer to [Kylin and Tableau Tutorial](./tableau.html) for detail guide.
-
 ### Install Kylin ODBC Driver
 Refer to this guide: [Kylin ODBC Driver Tutorial](./odbc.html).
 Please make sure to download and install Kylin ODBC Driver __v1.5__. If you already installed ODBC Driver in your system, please uninstall it first. 
diff --git a/website/_docs23/tutorial/use_cube_planner.cn.md b/website/_docs23/tutorial/use_cube_planner.cn.md
index cb63db5..953dd98 100644
--- a/website/_docs23/tutorial/use_cube_planner.cn.md
+++ b/website/_docs23/tutorial/use_cube_planner.cn.md
@@ -1,5 +1,5 @@
 ---
-layout: docs23
+layout: docs23-cn
 title:  使用 Cube Planner
 categories: tutorial
 permalink: /cn/docs23/tutorial/use_cube_planner.html
@@ -42,18 +42,18 @@ kylin.metrics.monitor-enabled=true
 
 1. 点击 '**Planner**' 按钮查看 Cube 的 '**Current Cuboid Distribution**'。
 
-  您应该确保 Cube 的状态是 '**READY**'
+  应该确保 Cube 的状态是 '**READY**'
 
-  如果 Cube 的状态是 '**DISABLED**'![Status_Disabled](/images/CubePlanner/Status_Disabled.png),您将不能使用 Cube planner。
+  如果 Cube 的状态是 '**DISABLED**',将不能使用 Cube planner。
 
-  如果 Cube 之前已经 build 过,您需要通过 building 或 enabling 它来将其状态从 '**DISABLED**' 变为 '**READY**'。
+  如果 Cube 之前已经 build 过,需要通过 building 或 enabling 它来将其状态从 '**DISABLED**' 变为 '**READY**'。
 
 
 #### 步骤 3:
 
 a. 点击 '**Planner**' 按钮查看 Cube 的 '**Current Cuboid Distribution**'。
 
-- 数据将会展示在 *[Sunburst Chart](https://en.wikipedia.org/wiki/Pie_chart#Ring_chart_.2F_Sunburst_chart_.2F_Multilevel_pie_chart)*。
+- 数据将会展示在 Sunburst Chart。
 
 - 每一部分代表一个 cuboid,以不同的颜色展示,颜色取决于对 cuboid 查询的**频率**。
 
diff --git a/website/_docs23/tutorial/use_dashboard.cn.md b/website/_docs23/tutorial/use_dashboard.cn.md
index 84b7003..804589b 100644
--- a/website/_docs23/tutorial/use_dashboard.cn.md
+++ b/website/_docs23/tutorial/use_dashboard.cn.md
@@ -1,5 +1,5 @@
 ---
-layout: docs23
+layout: docs23-cn
 title:  使用 Dashboard
 categories: tutorial
 permalink: /cn/docs23/tutorial/use_dashboard.html
diff --git a/website/_layouts/docs23-cn.html b/website/_layouts/docs23-cn.html
index b44fd32..e2e005c 100644
--- a/website/_layouts/docs23-cn.html
+++ b/website/_layouts/docs23-cn.html
@@ -23,9 +23,8 @@
 		{% include header.cn.html %}
 		
 		<div class="container">
-			<div class="row">
-				{% include docs23_nav.cn.html %}
-				<div class="col-md-8 col-lg-8 col-xs-12 col-sm-12 aside2">
+			<div class="row" style="clear:both;">
+				<div class="col-md-8 col-lg-8 col-xs-12 col-sm-12 aside2" style="float:right;">
 					<div id="container" class="docs">
 						<div id="pjax">
 							<h1 class="post-title">{{ page.title }}</h1>
@@ -35,6 +34,7 @@
 						</div>
 					</div>
 				</div>
+				{% include docs23_nav.cn.html %}
 			</div>
 		</div>		
 		{% include footer.html %}