Author: lidong Date: Mon Sep 4 14:01:45 2017 New Revision: 1807226 URL: http://svn.apache.org/viewvc?rev=1807226&view=rev Log: KYLIN-2795 Improve REST API document, add get/list jobs
Modified: kylin/site/docs21/howto/howto_use_restapi.html kylin/site/feed.xml Modified: kylin/site/docs21/howto/howto_use_restapi.html URL: http://svn.apache.org/viewvc/kylin/site/docs21/howto/howto_use_restapi.html?rev=1807226&r1=1807225&r2=1807226&view=diff ============================================================================== --- kylin/site/docs21/howto/howto_use_restapi.html (original) +++ kylin/site/docs21/howto/howto_use_restapi.html Mon Sep 4 14:01:45 2017 @@ -2861,6 +2861,7 @@ <li><a href="#discard-job">Discard job</a></li> <li><a href="#get-job-status">Get job status</a></li> <li><a href="#get-job-step-output">Get job step output</a></li> + <li><a href="#get-job-list">Get job list</a></li> </ul> </li> <li>Metadata @@ -3779,6 +3780,72 @@ Get descriptor for specified cube instan </span></code></pre> </div> +<h2 id="get-job-list">Get job list</h2> +<p><code class="highlighter-rouge">GET /kylin/api/jobs</code></p> + +<h4 id="path-variable-12">Path Variable</h4> +<ul> + <li>cubeName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Cube name.</li> + <li>projectName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Project name.</li> + <li>status - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">int</code> Job status, e.g. (NEW: 0, PENDING: 1, RUNNING: 2, STOPPED: 32, FINISHED: 4, ERROR: 8, DISCARDED: 16)</li> + <li>offset - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">int</code> Offset used by pagination.</li> + <li>limit - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">int</code> Jobs per page.</li> + <li>timeFilter - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">int</code>, e.g. (LAST ONE DAY: 0, LAST ONE WEEK: 1, LAST ONE MONTH: 2, LAST ONE YEAR: 3, ALL: 4)</li> +</ul> + +<h4 id="response-sample-13">Response Sample</h4> +<div class="highlighter-rouge"><pre class="highlight"><code>[ + { + "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 + } +] +</code></pre> +</div> <hr /> <h2 id="get-hive-table">Get Hive Table</h2> @@ -3789,7 +3856,7 @@ Get descriptor for specified cube instan <li>tableName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> table name to find.</li> </ul> -<h4 id="response-sample-13">Response Sample</h4> +<h4 id="response-sample-14">Response Sample</h4> <div class="highlighter-rouge"><pre class="highlight"><code><span class="o">{</span> uuid: <span class="s2">"69cc92c0-fc42-4bb9-893f-bd1141c91dbe"</span>, name: <span class="s2">"SAMPLE_07"</span>, @@ -3824,7 +3891,7 @@ Get descriptor for specified cube instan <li>tableName - <code class="highlighter-rouge">optional</code> <code class="highlighter-rouge">string</code> table name to find.</li> </ul> -<h4 id="response-sample-14">Response Sample</h4> +<h4 id="response-sample-15">Response Sample</h4> <div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w"> </span><span class="nt">"minFileSize"</span><span class="p">:</span><span class="w"> </span><span class="s2">"46055"</span><span class="p">,</span><span class="w"> </span><span class="nt">"totalNumberFiles"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="p">,</span><span class="w"> @@ -3854,7 +3921,7 @@ Get descriptor for specified cube instan <li>ext- <code class="highlighter-rouge">optional</code> <code class="highlighter-rouge">boolean</code> set true to get extend info of table.</li> </ul> -<h4 id="response-sample-15">Response Sample</h4> +<h4 id="response-sample-16">Response Sample</h4> <div class="highlighter-rouge"><pre class="highlight"><code><span class="o">[</span> <span class="o">{</span> uuid: <span class="s2">"53856c96-fe4d-459e-a9dc-c339b1bc3310"</span>, @@ -3910,7 +3977,7 @@ Get descriptor for specified cube instan <li>project - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">String</code> the project which the tables will be loaded into.</li> </ul> -<h4 id="response-sample-16">Response Sample</h4> +<h4 id="response-sample-17">Response Sample</h4> <div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w"> </span><span class="nt">"result.loaded"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"DEFAULT.SAMPLE_07"</span><span class="p">],</span><span class="w"> </span><span class="nt">"result.unloaded"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"sapmle_08"</span><span class="p">]</span><span class="w"> @@ -3923,7 +3990,7 @@ Get descriptor for specified cube instan <h2 id="wipe-cache">Wipe cache</h2> <p><code class="highlighter-rouge">PUT /kylin/api/cache/{type}/{name}/{action}</code></p> -<h4 id="path-variable-12">Path variable</h4> +<h4 id="path-variable-13">Path variable</h4> <ul> <li>type - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> âMETADATAâ or âCUBEâ</li> <li>name - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Cache key, e.g the cube name.</li> @@ -3937,12 +4004,12 @@ Get descriptor for specified cube instan <p><code class="highlighter-rouge">PUT /kylin/api/cubes/{cubeName}/init_start_offsets</code></p> -<h4 id="path-variable-13">Path variable</h4> +<h4 id="path-variable-14">Path variable</h4> <ul> <li>cubeName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Cube name</li> </ul> -<h4 id="response-sample-17">Response Sample</h4> +<h4 id="response-sample-18">Response Sample</h4> <div class="highlighter-rouge"><pre class="highlight"><code><span class="o">{</span> <span class="s2">"result"</span>: <span class="s2">"success"</span>, <span class="s2">"offsets"</span>: <span class="s2">"{0=246059529, 1=253547684, 2=253023895, 3=172996803, 4=165503476, 5=173513896, 6=19200473, 7=26691891, 8=26699895, 9=26694021, 10=19204164, 11=26694597}"</span> @@ -3955,7 +4022,7 @@ Get descriptor for specified cube instan <p>This API is specific for stream cubeâs building;</p> -<h4 id="path-variable-14">Path variable</h4> +<h4 id="path-variable-15">Path variable</h4> <ul> <li>cubeName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Cube name</li> </ul> @@ -3978,7 +4045,7 @@ Get descriptor for specified cube instan </code></pre> </div> -<h4 id="response-sample-18">Response Sample</h4> +<h4 id="response-sample-19">Response Sample</h4> <div class="highlighter-rouge"><pre class="highlight"><code><span class="o">{</span> <span class="s2">"uuid"</span>: <span class="s2">"3afd6e75-f921-41e1-8c68-cb60bc72a601"</span>, <span class="s2">"last_modified"</span>: 1480402541240, @@ -3999,7 +4066,7 @@ Get descriptor for specified cube instan <h2 id="check-segment-holes">Check segment holes</h2> <p><code class="highlighter-rouge">GET /kylin/api/cubes/{cubeName}/holes</code></p> -<h4 id="path-variable-15">Path variable</h4> +<h4 id="path-variable-16">Path variable</h4> <ul> <li>cubeName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Cube name</li> </ul> @@ -4007,7 +4074,7 @@ Get descriptor for specified cube instan <h2 id="fill-segment-holes">Fill segment holes</h2> <p><code class="highlighter-rouge">PUT /kylin/api/cubes/{cubeName}/holes</code></p> -<h4 id="path-variable-16">Path variable</h4> +<h4 id="path-variable-17">Path variable</h4> <ul> <li>cubeName - <code class="highlighter-rouge">required</code> <code class="highlighter-rouge">string</code> Cube name</li> </ul> Modified: kylin/site/feed.xml URL: http://svn.apache.org/viewvc/kylin/site/feed.xml?rev=1807226&r1=1807225&r2=1807226&view=diff ============================================================================== --- kylin/site/feed.xml (original) +++ kylin/site/feed.xml Mon Sep 4 14:01:45 2017 @@ -19,8 +19,8 @@ <description>Apache Kylin Home</description> <link>http://kylin.apache.org/</link> <atom:link href="http://kylin.apache.org/feed.xml" rel="self" type="application/rss+xml"/> - <pubDate>Sun, 03 Sep 2017 06:59:33 -0700</pubDate> - <lastBuildDate>Sun, 03 Sep 2017 06:59:33 -0700</lastBuildDate> + <pubDate>Mon, 04 Sep 2017 06:59:20 -0700</pubDate> + <lastBuildDate>Mon, 04 Sep 2017 06:59:20 -0700</lastBuildDate> <generator>Jekyll v2.5.3</generator> <item>