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/05/25 01:50:56 UTC
[kylin] branch document updated: document review
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
The following commit(s) were added to refs/heads/document by this push:
new da29b12 document review
da29b12 is described below
commit da29b12d8b795d5953cd7ad34def9e201ddec67d
Author: shaofengshi <sh...@apache.org>
AuthorDate: Fri May 25 09:50:46 2018 +0800
document review
---
website/_docs23/tutorial/kylin_client_tool.md | 93 ++++++++++++---------
website/_docs23/tutorial/setup_systemcube.md | 12 ++-
website/_docs23/tutorial/use_cube_planner.md | 29 ++-----
website/_docs23/tutorial/use_dashboard.md | 15 +---
.../images/CubePlanner/CubePlanner_Optimize.png | Bin 69277 -> 0 bytes
website/images/CubePlanner/DISABLED2READY.png | Bin 12155 -> 0 bytes
website/images/CubePlanner/Root.png | Bin 96658 -> 0 bytes
website/images/CubePlanner/Rowkeys.png | Bin 42367 -> 0 bytes
website/images/CubePlanner/Running.png | Bin 2903 -> 0 bytes
website/images/CubePlanner/Status_Disabled.png | Bin 2435 -> 0 bytes
website/images/CubePlanner/Status_Ready.png | Bin 2209 -> 0 bytes
website/images/Dashboard/Cube-Info-Page.png | Bin 104311 -> 0 bytes
website/images/Dashboard/Job-Link-Page-Waiting.png | Bin 70926 -> 0 bytes
website/images/Dashboard/Job-Link-Page.png | Bin 73430 -> 0 bytes
website/images/Dashboard/Query-Link-Page.png | Bin 74150 -> 0 bytes
website/images/SystemCube/reload_metadata.png | Bin 138984 -> 0 bytes
16 files changed, 66 insertions(+), 83 deletions(-)
diff --git a/website/_docs23/tutorial/kylin_client_tool.md b/website/_docs23/tutorial/kylin_client_tool.md
index 5e39ae0..bbd4c54 100644
--- a/website/_docs23/tutorial/kylin_client_tool.md
+++ b/website/_docs23/tutorial/kylin_client_tool.md
@@ -1,6 +1,6 @@
---
layout: docs23
-title: Kylin Python Client Library
+title: Kylin Python Client
categories: tutorial
permalink: /docs23/tutorial/kylin_client_tool.html
---
@@ -13,87 +13,95 @@ Apache Kylin Python Client Library is a python-based Apache Kylin client. There
You can get more detail from this [Github Repository](https://github.com/Kyligence/kylinpy).
## Installation
-Make sure python version is 2.7+ or 3.4+. The easiest way to install Apache Kylin Python Client Library is to use "pip":
+Make sure Python version is 2.7+ or 3.4+. The easiest way to install Apache Kylin Python Client Library is to use "pip":
```
- pip install --upgrade kylinpy
+pip install --upgrade kylinpy
```
## Kylinpy CLI
After installing Apache Kylin Python Client Library you may run kylinpy in terminal.
```
- $ kylinpy
- Usage: kylinpy [OPTIONS] COMMAND [ARGS]...
-
- Options:
- -h, --host TEXT Kylin host name [required]
- -P, --port INTEGER Kylin port, default: 7070
- -u, --username TEXT Kylin username [required]
- -p, --password TEXT Kylin password [required]
- --project TEXT Kylin project [required]
- --prefix TEXT Kylin RESTful prefix of url, default: "/kylin/api"
- --debug / --no-debug show debug infomation
- --api2 / --api1 API version; default is "api1"; "api1" is for Apache Kylin;
- --help Show this message and exit.
-
- Commands:
- auth get user auth info
- cube_columns list cube columns
- cube_desc show cube description
- cube_names list cube names
- model_desc show model description
- projects list all projects
- query sql query
- table_columns list table columns
- table_names list all table names
+$ kylinpy
+Usage: kylinpy [OPTIONS] COMMAND [ARGS]...
+
+Options:
+ -h, --host TEXT Kylin host name [required]
+ -P, --port INTEGER Kylin port, default: 7070
+ -u, --username TEXT Kylin username [required]
+ -p, --password TEXT Kylin password [required]
+ --project TEXT Kylin project [required]
+ --prefix TEXT Kylin RESTful prefix of url, default: "/kylin/api"
+ --debug / --no-debug show debug infomation
+ --help Show this message and exit.
+
+Commands:
+ auth get user auth info
+ cube_columns list cube columns
+ cube_desc show cube description
+ cube_names list cube names
+ model_desc show model description
+ projects list all projects
+ query sql query
+ table_columns list table columns
+ table_names list all table names
```
## Examples for Kylinpy CLI
1. To get all user info from Apache Kylin with debug mode
+
```
-kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --api1 --debug auth
+kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --debug auth
```
2. To get all cube columns from Apache Kylin with debug mode
+
```
-kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --api1 --debug cube_columns --name kylin_sales_cube
+kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --debug cube_columns --name kylin_sales_cube
```
3. To get cube description of selected cube from Apache Kylin with debug mode
+
```
-kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --api1 --debug cube_desc --name kylin_sales_cube
+kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --debug cube_desc --name kylin_sales_cube
```
4. To get all cube names from Apache Kylin with debug mode
+
```
-kylinpy -h hostname -u ADMIN -p KYLIN --project learn_kylin --api1 --debug cube_names
+kylinpy -h hostname -u ADMIN -p KYLIN --project learn_kylin --debug cube_names
```
5. To get cube SQL of selected cube from Apache Kylin with debug mode
+
```
-kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --api1 --debug cube_sql --name kylin_sales_cube
+kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --debug cube_sql --name kylin_sales_cube
```
6. To list all projects from Apache Kylin with debug mode
+
```
-kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --api1 --debug projects
+kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --debug projects
```
7. To list all tables column of selected cube from Apache Kylin with debug mode
+
```
-kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --api1 --debug table_columns --name KYLIN_SALES
+kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --debug table_columns --name KYLIN_SALES
```
8. To get all table names from kylin
+
```
kylinpy -h hostname -u ADMIN -p KYLIN --project learn_kylin --api1 table_names
```
9. To get the model description of the selected model from Apache Kylin with debug mode
+
```
-kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --api1 --debug model_desc --name kylin_sales_model
+kylinpy -h hostname -P 7070 -u ADMIN -p KYLIN --project learn_kylin --debug model_desc --name kylin_sales_model
```
## Kylin dialect for SQLAlchemy
@@ -107,14 +115,15 @@ kylin://<username>:<password>@<hostname>:<port>/<project>?version=<v1|v2>&prefix
## Examples for SQLAlchemy
Test connection with Apache Kylin
+
```
- $ python
- >>> import sqlalchemy as sa
- >>> kylin_engine = sa.create_engine('kylin://username:password@hostname:7070/learn_kylin?version=v1')
- >>> results = kylin_engine.execute('SELECT count(*) FROM KYLIN_SALES')
- >>> [e for e in results]
+$ python
+ >>> import sqlalchemy as sa
+ >>> kylin_engine = sa.create_engine('kylin://username:password@hostname:7070/learn_kylin?version=v1')
+ >>> results = kylin_engine.execute('SELECT count(*) FROM KYLIN_SALES')
+ >>> [e for e in results]
[(4953,)]
- >>> kylin_engine.table_names()
+ >>> kylin_engine.table_names()
[u'KYLIN_ACCOUNT',
u'KYLIN_CAL_DT',
u'KYLIN_CATEGORY_GROUPINGS',
@@ -122,3 +131,5 @@ Test connection with Apache Kylin
u'KYLIN_SALES',
u'KYLIN_STREAMING_TABLE']
```
+
+
diff --git a/website/_docs23/tutorial/setup_systemcube.md b/website/_docs23/tutorial/setup_systemcube.md
index 68ea655..47ce653 100644
--- a/website/_docs23/tutorial/setup_systemcube.md
+++ b/website/_docs23/tutorial/setup_systemcube.md
@@ -5,7 +5,7 @@ categories: tutorial
permalink: /docs23/tutorial/setup_systemcube.html
---
-> Available since Apache Kylin v2.3.x
+> Available since Apache Kylin v2.3.0
## What is System Cube
@@ -70,11 +70,9 @@ Then we need to upload metadata to hbase by the following command:
### 4. Reload Metadata
Finally, we need to reload metadata in Kylin web UI.
-![reload_metadata](/images/SystemCube/reload_metadata.png)
Then, a set of system Cubes will be created under the system project, called "KYLIN_SYSTEM".
-![kylin_system](/images/SystemCube/kylin_system.png)
### 5. System Cube build
When the system Cube is created, we need to build the Cube regularly.
@@ -342,10 +340,10 @@ This Cube is for collecting query metrics at the Cube level. The most important
</table>
### METRICS_JOB
-In kylin, there are mainly three types of job:
-- "BUILD",for building Cube segments from **HIVE**.
-- "MERGE",for merging Cube segments in **HBASE**.
-- "OPTIMIZE",for dynamically adjusting the precalculated cuboid tree base on the **base cuboid** in **HBASE**.
+In Kylin, there are mainly three types of job:
+- "BUILD", for building Cube segments from **HIVE**.
+- "MERGE", for merging Cube segments in **HBASE**.
+- "OPTIMIZE", for dynamically adjusting the precalculated cuboid tree base on the **base cuboid** in **HBASE**.
This Cube is for collecting job metrics. The details are as follows:
diff --git a/website/_docs23/tutorial/use_cube_planner.md b/website/_docs23/tutorial/use_cube_planner.md
index 7f8c3a3..4d889ff 100644
--- a/website/_docs23/tutorial/use_cube_planner.md
+++ b/website/_docs23/tutorial/use_cube_planner.md
@@ -42,15 +42,12 @@ kylin.metrics.monitor-enabled=true
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).
+ You should make sure the status of the Cube is '**READY**'
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 building it or enabling it if it has been built before.
- You should change the status of the Cube from '**DISABLED**' to '**READY**' by clicking the '**Enable**' button.
-
- ![DISABLED2READY](/images/CubePlanner/DISABLED2READY.png)
#### Step 3:
@@ -73,9 +70,7 @@ a. Click the '**Planner**' button to view the '**Current Cuboid Distribution**'
![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)
+ 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.
**ID** is the unique id of the cuboid.
@@ -89,13 +84,9 @@ a. Click the '**Planner**' button to view the '**Current Cuboid Distribution**'
- 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.
+- If you want to specify a leaf, just click on it. The view will change automatically.
![Leaf-Specify](/images/CubePlanner/Leaf-Specify.png)
@@ -105,13 +96,13 @@ As for a leaf, its '**Name**' is composed of several '0's and 1's.
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.
+If the Cube is currently under building, the Cube planner '**Recommend**' function will not be able to perform. Please wait the build to finish.
- 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)*.
+- The data will be displayed in Sunburst Chart.
- Each part is shown in different colors determined by the **frequency**.
@@ -125,13 +116,7 @@ If the Cube is currently under building![Running](/images/CubePlanner/Running.pn
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.
+- A window will jump up to confirm. 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.
diff --git a/website/_docs23/tutorial/use_dashboard.md b/website/_docs23/tutorial/use_dashboard.md
index fe748ea..75755af 100644
--- a/website/_docs23/tutorial/use_dashboard.md
+++ b/website/_docs23/tutorial/use_dashboard.md
@@ -17,7 +17,7 @@ Kylin Dashboard shows useful Cube usage statistics, which are very important to
To enable Dashboard on WebUI, you need to ensure these are all set:
* Set **kylin.web.dashboard-enabled=true** in **kylin.properties**.
-* Setup system Cubes according to [toturial](howto_setup_systemcube.html).
+* Setup system Cubes according to [toturial](setup_systemcube.html).
## How to use it
@@ -60,9 +60,6 @@ Now the data analysis will be changed and shown on the same page. (Important inf
You can click the '**More Details**' in these two boxes and you will be led to the '**Model**' page.
- ![Cube-Info-Page](/images/Dashboard/Cube-Info-Page.png)
-
-
- Numbers in '**Query Count**', '**Average Query Latency**', '**Job Count**' and '**Average Build Time per MB**' are in **Green**.
You can click on these four rectangles to get detail infomation about the data you selected. The detail information will then be shown as diagrams and displayed in '**Data grouped by Project**' and '**Data grouped by Time**' boxes.
@@ -79,8 +76,6 @@ Now the data analysis will be changed and shown on the same page. (Important inf
You can click the '**More Details**' in these two boxes and you will be led to the '**Insight**' page.
- ![Query-Link-Page](/images/Dashboard/Query-Link-Page.png)
-
2. '**Job Count**' and '**Average Build Time per MB**'
You can click on '**Job Count**' to get detail infomation.
@@ -91,13 +86,7 @@ Now the data analysis will be changed and shown on the same page. (Important inf
![AVG-Build-Time](/images/Dashboard/AVGBuildTimePerMB.jpg)
- You can click the '**More Details**' in these two boxes and you will be led to the '**Monitor**' page.
-
- ![Job-Link-Page](/images/Dashboard/Job-Link-Page.png)
-
- It is common to see the browser showing 'Please wait...'.
-
- ![Job-Link-Page-Waiting](/images/Dashboard/Job-Link-Page-Waiting.png)
+ You can click the '**More Details**' in these two boxes and you will be led to the '**Monitor**' page. It is common to see the browser showing 'Please wait...'.
#### Step 4:
diff --git a/website/images/CubePlanner/CubePlanner_Optimize.png b/website/images/CubePlanner/CubePlanner_Optimize.png
deleted file mode 100755
index a95c33f..0000000
Binary files a/website/images/CubePlanner/CubePlanner_Optimize.png and /dev/null differ
diff --git a/website/images/CubePlanner/DISABLED2READY.png b/website/images/CubePlanner/DISABLED2READY.png
deleted file mode 100755
index 023b3ca..0000000
Binary files a/website/images/CubePlanner/DISABLED2READY.png and /dev/null differ
diff --git a/website/images/CubePlanner/Root.png b/website/images/CubePlanner/Root.png
deleted file mode 100755
index f7a3478..0000000
Binary files a/website/images/CubePlanner/Root.png and /dev/null differ
diff --git a/website/images/CubePlanner/Rowkeys.png b/website/images/CubePlanner/Rowkeys.png
deleted file mode 100644
index 8dfbcac..0000000
Binary files a/website/images/CubePlanner/Rowkeys.png and /dev/null differ
diff --git a/website/images/CubePlanner/Running.png b/website/images/CubePlanner/Running.png
deleted file mode 100755
index a9f0e96..0000000
Binary files a/website/images/CubePlanner/Running.png and /dev/null differ
diff --git a/website/images/CubePlanner/Status_Disabled.png b/website/images/CubePlanner/Status_Disabled.png
deleted file mode 100755
index 74a1228..0000000
Binary files a/website/images/CubePlanner/Status_Disabled.png and /dev/null differ
diff --git a/website/images/CubePlanner/Status_Ready.png b/website/images/CubePlanner/Status_Ready.png
deleted file mode 100755
index 71fcbd5..0000000
Binary files a/website/images/CubePlanner/Status_Ready.png and /dev/null differ
diff --git a/website/images/Dashboard/Cube-Info-Page.png b/website/images/Dashboard/Cube-Info-Page.png
deleted file mode 100644
index f2b2cd5..0000000
Binary files a/website/images/Dashboard/Cube-Info-Page.png and /dev/null differ
diff --git a/website/images/Dashboard/Job-Link-Page-Waiting.png b/website/images/Dashboard/Job-Link-Page-Waiting.png
deleted file mode 100644
index 95b0512..0000000
Binary files a/website/images/Dashboard/Job-Link-Page-Waiting.png and /dev/null differ
diff --git a/website/images/Dashboard/Job-Link-Page.png b/website/images/Dashboard/Job-Link-Page.png
deleted file mode 100644
index 4b00459..0000000
Binary files a/website/images/Dashboard/Job-Link-Page.png and /dev/null differ
diff --git a/website/images/Dashboard/Query-Link-Page.png b/website/images/Dashboard/Query-Link-Page.png
deleted file mode 100644
index eee9493..0000000
Binary files a/website/images/Dashboard/Query-Link-Page.png and /dev/null differ
diff --git a/website/images/SystemCube/reload_metadata.png b/website/images/SystemCube/reload_metadata.png
deleted file mode 100644
index 0046f92..0000000
Binary files a/website/images/SystemCube/reload_metadata.png and /dev/null differ
--
To stop receiving notification emails like this one, please contact
shaofengshi@apache.org.