You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2018/01/14 12:28:38 UTC

[2/4] kylin git commit: APACHE-KYLIN-3154: Create a document for cube planner

APACHE-KYLIN-3154: Create a document for cube planner

Signed-off-by: Zhong <nj...@apache.org>
Signed-off-by: lidongsjtu <li...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/7175ca94
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/7175ca94
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/7175ca94

Branch: refs/heads/document
Commit: 7175ca94aae712d49a83c1eb90dcc38e57706e5f
Parents: 5c5914b
Author: Kalin <qi...@ebay.com>
Authored: Mon Jan 8 04:26:22 2018 +0800
Committer: lidongsjtu <li...@apache.org>
Committed: Sun Jan 14 19:54:29 2018 +0800

----------------------------------------------------------------------
 website/_docs21/howto/howto_use_cube_planner.md | 127 +++++++++++++++++++
 website/images/CubePlanner/CP.png               | Bin 0 -> 95460 bytes
 website/images/CubePlanner/CPRecom.png          | Bin 0 -> 142956 bytes
 website/images/CubePlanner/CubePlanner.png      | Bin 0 -> 272336 bytes
 .../images/CubePlanner/CubePlanner_Optimize.png | Bin 0 -> 69277 bytes
 website/images/CubePlanner/DISABLED2READY.png   | Bin 0 -> 12155 bytes
 .../images/CubePlanner/Leaf-Specify-Parent.png  | Bin 0 -> 56938 bytes
 website/images/CubePlanner/Leaf-Specify.png     | Bin 0 -> 57581 bytes
 website/images/CubePlanner/Leaf.png             | Bin 0 -> 96579 bytes
 website/images/CubePlanner/Recommending.png     | Bin 0 -> 74217 bytes
 website/images/CubePlanner/Root.png             | Bin 0 -> 96658 bytes
 website/images/CubePlanner/Rowkeys.png          | Bin 0 -> 42367 bytes
 website/images/CubePlanner/Running.png          | Bin 0 -> 2903 bytes
 website/images/CubePlanner/Status_Disabled.png  | Bin 0 -> 2435 bytes
 website/images/CubePlanner/Status_Ready.png     | Bin 0 -> 2209 bytes
 .../CubePlanner/column_name+optimize_time.png   | Bin 0 -> 365858 bytes
 website/images/CubePlanner/export_cuboids.png   | Bin 0 -> 343238 bytes
 website/images/CubePlanner/optimize_email.png   | Bin 0 -> 155299 bytes
 18 files changed, 127 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/_docs21/howto/howto_use_cube_planner.md
----------------------------------------------------------------------
diff --git a/website/_docs21/howto/howto_use_cube_planner.md b/website/_docs21/howto/howto_use_cube_planner.md
new file mode 100644
index 0000000..3ae412c
--- /dev/null
+++ b/website/_docs21/howto/howto_use_cube_planner.md
@@ -0,0 +1,127 @@
+---
+layout: docs21
+title:  Use Cube Planner
+categories: howto
+permalink: /docs21/howto/howto_use_cube_planner.html
+---
+
+# Cube Planner
+
+## What is Cube Planner
+
+OLAP solution trades off online query speed with offline cube build cost (compute resource to build cube and storage resource to save the cube data). Resource efficiency is the most important competency of OLAP engine. To be resource efficient, It is critical to just pre-build the most valuable cuboids.
+
+Cube Planner makes Apache Kylin to be more resource efficient. It intelligently build a partial cube to minimize the cost of building a cube and at the same time maximize the benefit of serving end user queries, then learn patterns from queries at runtime and dynamically recommend cuboids accordingly. 
+
+![CubePlanner](/images/CubePlanner/CubePlanner.png)
+
+## How to use it
+
+*Note: Cube planner optimization is not suitable for new cube. Cube should be online on production for a while (like 3 months) before optimizing it. So that Kylin platform collects enough real queries from end user and use them to optimize the cube.*  
+
+#### Step 1:
+
+​	Select a cube
+
+#### Step 2:
+
+1. Click the '**Planner**' button to view the '**Current Cuboid Distribution**' of the cube.
+
+  You should make sure the status of the cube is '**READY**'![Status_Ready](/images/CubePlanner/Status_Ready.png).
+
+  If the status of the cube is '**DISABLED**'![Status_Disabled](/images/CubePlanner/Status_Disabled.png), you will not be able to use the cube planner.
+
+  ​
+
+  You should change the status of the cube from '**DISABLED**' to '**READY**' by clicking the '**Enable**' button.
+
+  ![DISABLED2READY](/images/CubePlanner/DISABLED2READY.png)
+
+#### Step 3:
+
+a. Click the '**Planner**' button to view the '**Current Cuboid Distribution**' of the cube.
+
+- The data will be displayed in *[Sunburst Chart](https://en.wikipedia.org/wiki/Pie_chart#Ring_chart_.2F_Sunburst_chart_.2F_Multilevel_pie_chart)*. 
+
+- Each part refers to a cuboid, is shown in different colors determined by the query **frequency** against this cuboid.
+
+     ![CubePlanner](/images/CubePlanner/CP.png)
+
+
+-  You can move the cursor over the chart and it will display the detail information of the cuboid.
+
+   The detail information contains 5 attributes, '**Name**', '**ID**', '**Query Count**', '**Exactly Match Count**', '**Row Count**' and '**Rollup Rate**'. 
+
+   Cuboid **Name** is composed of several '0' or '1'. It means a combination of dimensions. '0' means the dimension doesn't exist in this combination, while '1' means the dimension exist in the combination. All the dimensions are ordered by the HBase row keys in advanced settings. 
+
+   Here is an example: 
+
+   ![CubePlanner](/images/CubePlanner/Leaf.png)
+
+   Name:1111111110000000 means the dimension combination is ["MONTH_BEG_DT","USER_CNTRY_SITE_CD","RPRTD_SGMNT_VAL","RPRTD_IND","SRVY_TYPE_ID","QSTN_ID","L1_L2_IND","PRNT_L1_ID","TRANCHE_ID"] based on the row key orders below:
+
+   ![CubePlanner](/images/CubePlanner/Rowkeys.png)
+
+   **ID** is the unique id of the cuboid.
+
+   **Query Count** is the total count of the queries that are served by this cuboid, including those queries that against other un-precalculated cuboids, but on line aggregated from this cuboid.  
+
+   **Exactly Match Count** is the query count that the query is actually against this cuboid.
+
+   **Row Count** is the total row count of all the segments for this cuboid.
+
+   **Rollup Rate** = (Cuboid's Row Count/its parent cuboid's Row Count) * 100%  
+
+-  The center of the sunburst chart contains the combined information of  basic cuboid. its '**Name**' is composed of several '1's.
+
+![Root](/images/CubePlanner/Root.png)
+
+As for a leaf, its '**Name**' is composed of several '0's and 1's. 
+
+![Leaf](/images/CubePlanner/Leaf.png)
+
+-    If you want to **specify** a leaf, just **click on** it. The view will change automatically.
+
+     ![Leaf-Specify](/images/CubePlanner/Leaf-Specify.png)
+
+-    If you want to specify the parent leaf of a leaf, click on the **center circle** (the part marked yellow).
+
+![Leaf-Specify-Parent](/images/CubePlanner/Leaf-Specify-Parent.png)
+
+b. Click the '**Recommend**' button to view the '**Recommend Cuboid Distribution**' of the cube.
+
+If the cube is currently under building![Running](/images/CubePlanner/Running.png), the cube planner '**Recommend**' function will not be able to perform correctly. Please first **stop the building progress** of the cube.
+
+-  The data will be calculated by unique algorithms. It is common to see this window.
+
+   ![Recommending](/images/CubePlanner/Recommending.png)
+
+-  The data will be displayed in *[Sunburst Chart](https://en.wikipedia.org/wiki/Pie_chart#Ring_chart_.2F_Sunburst_chart_.2F_Multilevel_pie_chart)*.
+
+   - Each part is shown in different colors determined by the **frequency**.
+
+![CubePlanner_Recomm](/images/CubePlanner/CPRecom.png)
+
+- Detailed operation of the '**Recommend Cuboid Distribution**' chart is the same as '**Current Cuboid Distribution**' chart.
+- User is able to tell the dimension names from a cuboid when mouse hovers over the sunburst chart as figure shown below.
+- User is able to click **'Export'** to export hot dimension combinations (TopN cuboids, currently including options of Top 10, Top 50, Top 100) from an existing cube as a json file, which will be downloaded to your local file system for recording or future import of dimension combinations when creating cube.
+
+![export cuboids](/images/CubePlanner/export_cuboids.png)
+
+c. Click the '**Optimize**' button to optimize the cube.
+
+- A window will jump up to ensure your decision.
+
+  ​	![CubePlanner_Optimize](/images/CubePlanner/CubePlanner_Optimize.png)
+
+  Click '**Yes**' to start the optimization.
+
+  Click '**Cancel**' to give up the optimization.
+
+- User is able to get to know the last optimized time of the cube in Cube Planner tab page. 
+
+![column name+optimize time](/images/CubePlanner/column_name+optimize_time.png)
+
+- User is able to receive an email notification for a cube optimization job.
+
+![optimize email](/images/CubePlanner/optimize_email.png)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/CP.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/CP.png b/website/images/CubePlanner/CP.png
new file mode 100755
index 0000000..4576a36
Binary files /dev/null and b/website/images/CubePlanner/CP.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/CPRecom.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/CPRecom.png b/website/images/CubePlanner/CPRecom.png
new file mode 100755
index 0000000..586956a
Binary files /dev/null and b/website/images/CubePlanner/CPRecom.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/CubePlanner.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/CubePlanner.png b/website/images/CubePlanner/CubePlanner.png
new file mode 100644
index 0000000..03055a4
Binary files /dev/null and b/website/images/CubePlanner/CubePlanner.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/CubePlanner_Optimize.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/CubePlanner_Optimize.png b/website/images/CubePlanner/CubePlanner_Optimize.png
new file mode 100755
index 0000000..a95c33f
Binary files /dev/null and b/website/images/CubePlanner/CubePlanner_Optimize.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/DISABLED2READY.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/DISABLED2READY.png b/website/images/CubePlanner/DISABLED2READY.png
new file mode 100755
index 0000000..023b3ca
Binary files /dev/null and b/website/images/CubePlanner/DISABLED2READY.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/Leaf-Specify-Parent.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/Leaf-Specify-Parent.png b/website/images/CubePlanner/Leaf-Specify-Parent.png
new file mode 100755
index 0000000..e4de0df
Binary files /dev/null and b/website/images/CubePlanner/Leaf-Specify-Parent.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/Leaf-Specify.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/Leaf-Specify.png b/website/images/CubePlanner/Leaf-Specify.png
new file mode 100755
index 0000000..e128d53
Binary files /dev/null and b/website/images/CubePlanner/Leaf-Specify.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/Leaf.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/Leaf.png b/website/images/CubePlanner/Leaf.png
new file mode 100755
index 0000000..1acc00d
Binary files /dev/null and b/website/images/CubePlanner/Leaf.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/Recommending.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/Recommending.png b/website/images/CubePlanner/Recommending.png
new file mode 100755
index 0000000..022952f
Binary files /dev/null and b/website/images/CubePlanner/Recommending.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/Root.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/Root.png b/website/images/CubePlanner/Root.png
new file mode 100755
index 0000000..f7a3478
Binary files /dev/null and b/website/images/CubePlanner/Root.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/Rowkeys.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/Rowkeys.png b/website/images/CubePlanner/Rowkeys.png
new file mode 100644
index 0000000..8dfbcac
Binary files /dev/null and b/website/images/CubePlanner/Rowkeys.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/Running.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/Running.png b/website/images/CubePlanner/Running.png
new file mode 100755
index 0000000..a9f0e96
Binary files /dev/null and b/website/images/CubePlanner/Running.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/Status_Disabled.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/Status_Disabled.png b/website/images/CubePlanner/Status_Disabled.png
new file mode 100755
index 0000000..74a1228
Binary files /dev/null and b/website/images/CubePlanner/Status_Disabled.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/Status_Ready.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/Status_Ready.png b/website/images/CubePlanner/Status_Ready.png
new file mode 100755
index 0000000..71fcbd5
Binary files /dev/null and b/website/images/CubePlanner/Status_Ready.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/column_name+optimize_time.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/column_name+optimize_time.png b/website/images/CubePlanner/column_name+optimize_time.png
new file mode 100644
index 0000000..b17385d
Binary files /dev/null and b/website/images/CubePlanner/column_name+optimize_time.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/export_cuboids.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/export_cuboids.png b/website/images/CubePlanner/export_cuboids.png
new file mode 100644
index 0000000..e4077cc
Binary files /dev/null and b/website/images/CubePlanner/export_cuboids.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/7175ca94/website/images/CubePlanner/optimize_email.png
----------------------------------------------------------------------
diff --git a/website/images/CubePlanner/optimize_email.png b/website/images/CubePlanner/optimize_email.png
new file mode 100644
index 0000000..37812b8
Binary files /dev/null and b/website/images/CubePlanner/optimize_email.png differ