Apache Kylin : Analytical Data Warehouse for Big Data
Page History
...
PUT /kylin/api/jobs/{jobId}/resume
Path variable
...
Variable name | Necessary | Type | Description |
---|---|---|---|
jobId | yes | string | Job id you want to resume |
...
Response Sample
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "uuid": "08cee8f9-da8c-4485-8193-f2bd5f790b40", |
...
"last_modified": 1594958133783, |
...
"version": "3.9.9.1", |
...
"name": "INDEX_MERGE CUBE - kylin_test_cube - 20120101000000_20120103000000 - CST 2020-07-17 11:18:23", |
...
"projectName": "learn_kylin", |
...
"type": "BUILD", |
...
"duration": 1, |
...
"related_cube": "kylin_test_cube", |
...
"display_cube_name": "kylin_test_cube", |
...
"related_segment": "c6547691-4aa1-20c9-b3c1-031630685d96", |
...
"related_segment_name": null, |
...
"exec_start_time": 1594955921627, |
...
"exec_end_time": 0, |
...
"exec_interrupt_time": 2211159, |
...
"mr_waiting": 0, |
...
"steps": [ |
...
{ |
...
"interruptCmd": null, |
...
"id": "08cee8f9-da8c-4485-8193-f2bd5f790b40-00", |
...
"name": "Detect Resource", |
...
"sequence_id": 0, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 1594955921761, |
...
"exec_end_time": 1594955922559, |
...
"exec_wait_time": 0, |
...
"step_status": "PENDING", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": { |
...
"startTime": "1594955921761", |
...
"endTime": "1594955922559" |
...
}, |
...
"run_async": false |
...
}, |
...
{ |
...
"interruptCmd": null, |
...
"id": "08cee8f9-da8c-4485-8193-f2bd5f790b40-01", |
...
"name": "Merge Segment Data", |
...
"sequence_id": 1, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 0, |
...
"exec_end_time": 0, |
...
"exec_wait_time": 0, |
...
"step_status": "PENDING", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": {}, |
...
"run_async": false |
...
}, |
...
{ |
...
"interruptCmd": null, |
...
"id": "08cee8f9-da8c-4485-8193-f2bd5f790b40-02", |
...
"name": "Clean Up Old Segment for merging job", |
...
"sequence_id": 2, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 0, |
...
"exec_end_time": 0, |
...
"exec_wait_time": 0, |
...
"step_status": "PENDING", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": {}, |
...
"run_async": false |
...
} |
...
], |
...
"submitter": "ADMIN", |
...
"job_status": "PENDING", |
...
"build_instance": "22507@cdh-worker-2", |
...
"progress": 0.0 |
...
} |
Pause Job
PUT /kylin/api/jobs/{jobId}/pause
Path variable
...
Variable name | Necessary | Type | Description |
---|---|---|---|
jobId | yes | string | Job id you want to pause |
...
Response Sample
Code Block |
---|
...
| ||||||||
{ "uuid": "331b89ad-f06a-4529-9eb7-f87e7c38bda0", |
...
"last_modified": 1594966683775, |
...
"version": "3.9.9.1", |
...
"name": "INDEX_BUILD CUBE - kylin_sales_cube - 20120401000000_20120501000000 - CST 2020-07-17 14:17:40", |
...
"projectName": "learn_kylin", |
...
"type": "BUILD", |
...
"duration": 22, |
...
"related_cube": "kylin_sales_cube", |
...
"display_cube_name": "kylin_sales_cube", |
...
"related_segment": "907d8d15-46b9-8aba-0ea8-1b9f86c6f98c", |
...
"related_segment_name": null, |
...
"exec_start_time": 1594966661626, |
...
"exec_end_time": 0, |
...
"exec_interrupt_time": 0, |
...
"mr_waiting": 0, |
...
"steps": [ |
...
{ |
...
"interruptCmd": null, |
...
"id": "331b89ad-f06a-4529-9eb7-f87e7c38bda0-00", |
...
"name": "Detect Resource", |
...
"sequence_id": 0, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 1594966661775, |
...
"exec_end_time": 0, |
...
"exec_wait_time": 0, |
...
"step_status": "STOPPED", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": { |
...
"startTime": "1594966661775" |
...
}, |
...
"run_async": false |
...
}, |
...
{ |
...
"interruptCmd": null, |
...
"id": "331b89ad-f06a-4529-9eb7-f87e7c38bda0-01", |
...
"name": "Build Cube with Spark", |
...
"sequence_id": 1, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 0, |
...
"exec_end_time": 0, |
...
"exec_wait_time": 0, |
...
"step_status": "PENDING", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": {}, |
...
"run_async": false |
...
} |
...
], |
...
"submitter": "ADMIN", |
...
"job_status": "STOPPED", |
...
"build_instance": "22507@cdh-worker-2", |
...
"progress": 0.0 |
...
} |
Discard Job
PUT /kylin/api/jobs/{jobId}/pause
Path variable
...
Variable name | Necessary | Type | Description |
---|---|---|---|
jobId | yes | string | Job id you want to discard |
...
Response Sample
Code Block | ||||
---|---|---|---|---|
|
...
| ||||
{ "uuid": "331b89ad-f06a-4529-9eb7-f87e7c38bda0", |
...
"last_modified": 1594966787261, |
...
"version": "3.9.9.1", |
...
"name": "INDEX_BUILD CUBE - kylin_sales_cube - 20120401000000_20120501000000 - CST 2020-07-17 14:17:40", |
...
"projectName": "learn_kylin", |
...
"type": "BUILD", |
...
"duration": 22, |
...
"related_cube": "kylin_sales_cube", |
...
"display_cube_name": "kylin_sales_cube", |
...
"related_segment": "907d8d15-46b9-8aba-0ea8-1b9f86c6f98c", |
...
"related_segment_name": null, |
...
"exec_start_time": 1594966661626, |
...
"exec_end_time": 1594966684193, |
...
"exec_interrupt_time": 0, |
...
"mr_waiting": 0, |
...
"steps": [ |
...
{ |
...
"interruptCmd": null, |
...
"id": "331b89ad-f06a-4529-9eb7-f87e7c38bda0-00", |
...
"name": "Detect Resource", |
...
"sequence_id": 0, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 1594966661775, |
...
"exec_end_time": 0, |
...
"exec_wait_time": 0, |
...
"step_status": "DISCARDED", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": { |
...
"startTime": "1594966661775" |
...
}, |
...
"run_async": false |
...
}, |
...
{ |
...
"interruptCmd": null, |
...
"id": "331b89ad-f06a-4529-9eb7-f87e7c38bda0-01", |
...
"name": "Build Cube with Spark", |
...
"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": "DISCARDED", |
...
"build_instance": "22507@cdh-worker-2", |
...
"progress": 0.0 |
...
} |
Drop Job
DELETE /kylin/api/jobs/{jobId}/drop
Path variable
Variable name |
---|
...
Necessary | Type | Description | |
---|---|---|---|
jobId | yes | string | Job id you want to delete |
...
Response Sample
Code Block | ||||
---|---|---|---|---|
|
...
| ||||
{ "uuid": "331b89ad-f06a-4529-9eb7-f87e7c38bda0", |
...
"last_modified": 1594966787261, |
...
"version": "3.9.9.1", |
...
"name": "INDEX_BUILD CUBE - kylin_sales_cube - 20120401000000_20120501000000 - CST 2020-07-17 14:17:40", |
...
"projectName": "learn_kylin", |
...
"type": "BUILD", |
...
"duration": 22, |
...
"related_cube": "kylin_sales_cube", |
...
"display_cube_name": "kylin_sales_cube", |
...
"related_segment": "907d8d15-46b9-8aba-0ea8-1b9f86c6f98c", |
...
"related_segment_name": null, |
...
"exec_start_time": 1594966661626, |
...
"exec_end_time": 1594966684193, |
...
"exec_interrupt_time": 0, |
...
"mr_waiting": 0, |
...
"steps": [ |
...
{ |
...
"interruptCmd": null, |
...
"id": "331b89ad-f06a-4529-9eb7-f87e7c38bda0-00", |
...
"name": "Detect Resource", |
...
"sequence_id": 0, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 1594966661775, |
...
"exec_end_time": 0, |
...
"exec_wait_time": 0, |
...
"step_status": "DISCARDED", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": { |
...
"startTime": "1594966661775" |
...
}, |
...
"run_async": false |
...
}, |
...
{ |
...
"interruptCmd": null, |
...
"id": "331b89ad-f06a-4529-9eb7-f87e7c38bda0-01", |
...
"name": "Build Cube with Spark", |
...
"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": "DISCARDED", |
...
"build_instance": "22507@cdh-worker-2", |
...
"progress": 0.0 |
...
} |
Get Job Status
GET /kylin/api/jobs/{jobId}
Path variable
...
Variable name | Necessary | Type | Description |
---|---|---|---|
jobId | yes | string | Job id you want to check |
Response Sample
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "uuid": "ba1f769b-d401-4114-afb6-84a5267d0838", |
...
"last_modified": 1594965352048, |
...
"version": "3.9.9.1", |
...
"name": "INDEX_BUILD CUBE - kylin_test_cube - 20120104000000_20120105000000 - CST 2020-07-17 13:52:48", |
...
"projectName": "learn_kylin", |
...
"type": "BUILD", |
...
"duration": 160, |
...
"related_cube": "kylin_test_cube", |
...
"display_cube_name": "kylin_test_cube", |
...
"related_segment": "bedc9623-623a-bfca-07c1-15ed0b858f40", |
...
"related_segment_name": null, |
...
"exec_start_time": 1594965191627, |
...
"exec_end_time": 1594965352023, |
...
"exec_interrupt_time": 0, |
...
"mr_waiting": 0, |
...
"steps": [ |
...
{ |
...
"interruptCmd": null, |
...
"id": "ba1f769b-d401-4114-afb6-84a5267d0838-00", |
...
"name": "Detect Resource", |
...
"sequence_id": 0, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 1594965191826, |
...
"exec_end_time": 1594965213304, |
...
"exec_wait_time": 0, |
...
"step_status": "FINISHED", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": { |
...
"startTime": "1594965191826", |
...
"endTime": "1594965213304" |
...
}, |
...
"run_async": false |
...
}, |
...
{ |
...
"interruptCmd": null, |
...
"id": "ba1f769b-d401-4114-afb6-84a5267d0838-01", |
...
"name": "Build Cube with Spark", |
...
"sequence_id": 1, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 1594965213587, |
...
"exec_end_time": 1594965351861, |
...
"exec_wait_time": 0, |
...
"step_status": "FINISHED", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": { |
...
"startTime": "1594965213587", |
...
"endTime": "1594965351861" |
...
}, |
...
"run_async": false |
...
} |
...
], |
...
"submitter": "ADMIN", |
...
"job_status": "FINISHED", |
...
"build_instance": "22507@cdh-worker-2", |
...
"progress": 100.0 |
...
} |
Get job step output
GET /kylin/api/jobs/{jobId}/steps/{stepId}/output
Path Variable
...
Variable name | Necessary | Type | Description |
---|---|---|---|
jobId | yes | string | Job id you want to check |
stepId | yes | 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-03” |
...
Response Sample
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "jobId": "4009ec01-0627-768b-cbb3-f41f90c72e6d", |
...
"cmd_output": "output_string", |
...
"stepId": "4009ec01-0627-768b-cbb3-f41f90c72e6d-02" |
...
} |
Get job list
GET /kylin/api/jobs
Request Variables
Variable name | Necessary |
---|
...
Type | Description | ||
---|---|---|---|
cubeName | yes | string | Cube name |
...
projectName |
...
yes | string | Project name |
...
status |
...
no | int | Job status, e.g. (NEW: 0, PENDING: 1, RUNNING: 2, STOPPED: 32, FINISHED: 4, ERROR: 8, DISCARDED: 16) | |
offset |
...
no | int | Offset used by pagination |
...
limit |
...
no | int | Jobs per page |
...
timeFilter |
...
no | 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
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[ { "uuid": "02a61bcc-1125-4943-b61f-fbd81e70d117", |
...
"last_modified": 1594965012630, |
...
"version": "3.9.9.1", |
...
"name": "INDEX_MERGE CUBE - kylin_sales_cube - 20120101000000_20120401000000 - CST 2020-07-17 13:49:55", |
...
"projectName": "learn_kylin", |
...
"type": "BUILD", |
...
"duration": 0, |
...
"related_cube": "kylin_sales_cube", |
...
"display_cube_name": "kylin_sales_cube", |
...
"related_segment": "676f3b1b-993e-9d49-f2b1-39e9b2cabd4a", |
...
"related_segment_name": null, |
...
"exec_start_time": 1594965011626, |
...
"exec_end_time": 1594965012593, |
...
"exec_interrupt_time": 0, |
...
"mr_waiting": 0, |
...
"steps": [ |
...
{ |
...
"interruptCmd": null, |
...
"id": "02a61bcc-1125-4943-b61f-fbd81e70d117-00", |
...
"name": "Detect Resource", |
...
"sequence_id": 0, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 1594965011732, |
...
"exec_end_time": 1594965012518, |
...
"exec_wait_time": 0, |
...
"step_status": "ERROR", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": { |
...
"startTime": "1594965011732", |
...
"endTime": "1594965012518" |
...
}, |
...
"run_async": false |
...
}, |
...
{ |
...
"interruptCmd": null, |
...
"id": "02a61bcc-1125-4943-b61f-fbd81e70d117-01", |
...
"name": "Merge Segment Data", |
...
"sequence_id": 1, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 0, |
...
"exec_end_time": 0, |
...
"exec_wait_time": 0, |
...
"step_status": "PENDING", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": {}, |
...
"run_async": false |
...
}, |
...
{ |
...
"interruptCmd": null, |
...
"id": "02a61bcc-1125-4943-b61f-fbd81e70d117-02", |
...
"name": "Clean Up Old Segment for merging job", |
...
"sequence_id": 2, |
...
"exec_cmd": null, |
...
"interrupt_cmd": null, |
...
"exec_start_time": 0, |
...
"exec_end_time": 0, |
...
"exec_wait_time": 0, |
...
"step_status": "PENDING", |
...
"cmd_type": "SHELL_CMD_HADOOP", |
...
"info": {}, |
...
"run_async": false |
...
} |
...
], |
...
"submitter": "ADMIN", |
...
"job_status": "ERROR", |
...
"build_instance": "22507@cdh-worker-2", |
...
"progress": 0.0 |
...
} |
...
] |
Get Job Status Overview
GET /kylin/api/jobs/overview
...
(Same as “Get job list”)
Response Sample
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "STOPPED": 0, |
...
"DISCARDED": 0, |
...
"ERROR": 1, |
...
"NEW": 0, |
...
"PENDING": 0, |
...
"FINISHED": 3, |
...
"RUNNING": 0 |
...
} |