added Chinese version of howto_build_cube_with_restapi Signed-off-by: Billy Liu <billy...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/2c9c574a Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/2c9c574a Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/2c9c574a Branch: refs/heads/document Commit: 2c9c574aa19d3cc7060bddca58fd3ec1a6fd7371 Parents: 34eabdb Author: link3280 <491325...@qq.com> Authored: Sat Oct 21 19:56:15 2017 +0800 Committer: Billy Liu <billy...@apache.org> Committed: Fri Jan 26 13:09:53 2018 +0800 ---------------------------------------------------------------------- .../howto/howto_build_cube_with_restapi.cn.md | 54 ++++++++++++++++++++ 1 file changed, 54 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/2c9c574a/website/_docs21/howto/howto_build_cube_with_restapi.cn.md ---------------------------------------------------------------------- diff --git a/website/_docs21/howto/howto_build_cube_with_restapi.cn.md b/website/_docs21/howto/howto_build_cube_with_restapi.cn.md new file mode 100644 index 0000000..5bd8348 --- /dev/null +++ b/website/_docs21/howto/howto_build_cube_with_restapi.cn.md @@ -0,0 +1,54 @@ +--- +layout: docs21 +title: ç¨APIæ建cube +categories: å¸®å© +permalink: /cn/docs21/howto/howto_build_cube_with_restapi.html +--- + +### 1. è®¤è¯ +* ç®åKylin使ç¨[basic authentication](http://en.wikipedia.org/wiki/Basic_access_authentication)ã +* ç»ç¬¬ä¸ä¸ªè¯·æ±å ä¸ç¨äºè®¤è¯ç Authorization 头é¨ã +* æè è¿è¡ä¸ä¸ªç¹å®ç请æ±: POST http://localhost:7070/kylin/api/user/authentication ã +* å®æ认è¯å, 客æ·ç«¯å¯ä»¥å¨æ¥ä¸æ¥ç请æ±é带ä¸cookieã +{% highlight Groff markup %} +POST http://localhost:7070/kylin/api/user/authentication + +Authorization:Basic xxxxJD124xxxGFxxxSDF +Content-Type: application/json;charset=UTF-8 +{% endhighlight %} + +### 2. è·åCubeç详ç»ä¿¡æ¯ +* `GET http://localhost:7070/kylin/api/cubes?cubeName={cube_name}&limit=15&offset=0` +* ç¨æ·å¯ä»¥å¨è¿åçcube详ç»ä¿¡æ¯éæ¾å°cubeçsegmentæ¥æèå´ã +{% highlight Groff markup %} +GET http://localhost:7070/kylin/api/cubes?cubeName=test_kylin_cube_with_slr&limit=15&offset=0 + +Authorization:Basic xxxxJD124xxxGFxxxSDF +Content-Type: application/json;charset=UTF-8 +{% endhighlight %} + +### 3. ç¶åæ交cubeæå»ºä»»å¡ +* `PUT http://localhost:7070/kylin/api/cubes/{cube_name}/rebuild` +* å ³äº put ç请æ±ä½ç»è请åè Build Cube API + * `startTime` å `endTime` åºè¯¥æ¯utcæ¶é´ã + * `buildType` å¯ä»¥æ¯ `BUILD` ã `MERGE` æ `REFRESH`ã `BUILD` ç¨äºæ建ä¸ä¸ªæ°çsegmentï¼ `REFRESH` ç¨äºå·æ°ä¸ä¸ªå·²æçsegmentï¼ `MERGE` ç¨äºå并å¤ä¸ªå·²æçsegmentçæä¸ä¸ªè¾å¤§çsegmentã +* è¿ä¸ªæ¹æ³ä¼è¿åä¸ä¸ªæ°å»ºçä»»å¡å®ä¾ï¼å®çuuidæ¯ä»»å¡çå¯ä¸idï¼ç¨äºè¿½è¸ªä»»å¡ç¶æã +{% highlight Groff markup %} +PUT http://localhost:7070/kylin/api/cubes/test_kylin_cube_with_slr/rebuild + +Authorization:Basic xxxxJD124xxxGFxxxSDF +Content-Type: application/json;charset=UTF-8 + +{ + "startTime": 0, + "endTime": 1388563200000, + "buildType": "BUILD" +} +{% endhighlight %} + +### 4. è·è¸ªä»»å¡ç¶æ +* `GET http://localhost:7070/kylin/api/jobs/{job_uuid}` +* è¿åç `job_status` 代表jobçå½åç¶æã + +### 5. å¦ææ建任å¡åºç°é误ï¼å¯ä»¥éæ°å¼å§å® +* `PUT http://localhost:7070/kylin/api/jobs/{job_uuid}/resume`