forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com> Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
191 lines
16 KiB
HTML
191 lines
16 KiB
HTML
<a name="dli_02_0128"></a><a name="dli_02_0128"></a>
|
|
|
|
<h1 class="topictitle1">Querying Batch Job Logs</h1>
|
|
<div id="body8662426"><div class="section" id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_s1f0e4fd3d502405199f36f78e68721aa"><h4 class="sectiontitle">Function</h4><p id="dli_02_0128__en-us_topic_0103345066_p17528370162248">This API is used to query the back-end logs of batch processing jobs.</p>
|
|
</div>
|
|
<div class="section" id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_s9e1b8ec5b57c422a942b19835da7d66e"><h4 class="sectiontitle">URI</h4><ul id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_en-us_topic_0069077927_ul10082125"><li id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_en-us_topic_0069077927_li23630265">URI format<p id="dli_02_0128__en-us_topic_0103345066_p959514116237"><a name="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_en-us_topic_0069077927_li23630265"></a><a name="en-us_topic_0103345066_en-us_topic_0102902523_en-us_topic_0069077927_li23630265"></a>GET /v2.0/{project_id}/batches/{batch_id}/log</p>
|
|
</li><li id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_li1725612218454">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_en-us_topic_0069077803_table60779388" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_en-us_topic_0069077803_row61411666"><th align="left" class="cellrowborder" valign="top" width="12.950000000000001%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_a420a62a594f9410eaea229ffc8037a61">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.06%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_en-us_topic_0069077803_p873025824211">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.85%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="dli_02_0128__p1563419114116">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60.14000000000001%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_a692d3cd97b464aed90ba6d841900a4a5">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_en-us_topic_0069077803_row48589216"><td class="cellrowborder" valign="top" width="12.950000000000001%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_en-us_topic_0069077803_p43412436">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.06%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_en-us_topic_0069077803_p26746391">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.85%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0128__p556401916411">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.14000000000001%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0128__p1310472724012">Project ID, which is used for resource isolation. For details about how to obtain its value, see <a href="dli_02_0183.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0128__en-us_topic_0103345066_row40002247161527"><td class="cellrowborder" valign="top" width="12.950000000000001%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0128__en-us_topic_0103345066_p11474470161527">batch_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.06%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0128__en-us_topic_0103345066_p57016873161527">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.85%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0128__p556491934113">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.14000000000001%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0128__en-us_topic_0103345066_p54964009161527">ID of a batch processing job.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_table1944164663513" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_row29441446113518"><th align="left" class="cellrowborder" valign="top" width="13.450000000000001%" id="mcps1.3.2.2.2.2.2.5.1.1"><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_p1935161415364">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.97%" id="mcps1.3.2.2.2.2.2.5.1.2"><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_p1036131419366">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.420000000000002%" id="mcps1.3.2.2.2.2.2.5.1.3"><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_p17381114123617">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60.160000000000004%" id="mcps1.3.2.2.2.2.2.5.1.4"><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_p1340121413614">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0128__row68913813376"><td class="cellrowborder" valign="top" width="13.450000000000001%" headers="mcps1.3.2.2.2.2.2.5.1.1 "><p id="dli_02_0128__p119023813372">from</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.2.2.2.2.2.5.1.2 "><p id="dli_02_0128__p492319117388">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.420000000000002%" headers="mcps1.3.2.2.2.2.2.5.1.3 "><p id="dli_02_0128__p2924111381">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.160000000000004%" headers="mcps1.3.2.2.2.2.2.5.1.4 "><p id="dli_02_0128__p1578152853810">Start line of the log to be displayed. By default, the last 100 lines of the log are displayed. If a log file contains fewer than 100 lines, line 0 is the start line.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0128__row199053815372"><td class="cellrowborder" valign="top" width="13.450000000000001%" headers="mcps1.3.2.2.2.2.2.5.1.1 "><p id="dli_02_0128__p3917387375">size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.2.2.2.2.2.5.1.2 "><p id="dli_02_0128__p092418123815">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.420000000000002%" headers="mcps1.3.2.2.2.2.2.5.1.3 "><p id="dli_02_0128__p492401193818">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.160000000000004%" headers="mcps1.3.2.2.2.2.2.5.1.4 "><p id="dli_02_0128__p7182105310395">Number of logs to be queried.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0128__row20634150143618"><td class="cellrowborder" valign="top" width="13.450000000000001%" headers="mcps1.3.2.2.2.2.2.5.1.1 "><p id="dli_02_0128__p1963555011368">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.2.2.2.2.2.5.1.2 "><p id="dli_02_0128__p126351250133611">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.420000000000002%" headers="mcps1.3.2.2.2.2.2.5.1.3 "><p id="dli_02_0128__p76351550183617">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.160000000000004%" headers="mcps1.3.2.2.2.2.2.5.1.4 "><p id="dli_02_0128__p13636750103616">If <span class="parmname" id="dli_02_0128__parmname1222239175716"><b>type</b></span> is set to <span class="parmvalue" id="dli_02_0128__parmvalue3204184445720"><b>driver</b></span>, the Spark Driver log is generated.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0128__row4823049113716"><td class="cellrowborder" valign="top" width="13.450000000000001%" headers="mcps1.3.2.2.2.2.2.5.1.1 "><p id="dli_02_0128__p15823184912379">index</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.2.2.2.2.2.5.1.2 "><p id="dli_02_0128__p2823349183712">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.420000000000002%" headers="mcps1.3.2.2.2.2.2.5.1.3 "><p id="dli_02_0128__p582314913716">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.160000000000004%" headers="mcps1.3.2.2.2.2.2.5.1.4 "><p id="dli_02_0128__p68237495374">When a submitted job is retried, multiple driver logs are generated. This parameter specifies the <span class="parmname" id="dli_02_0128__parmname11799195518578"><b>index</b></span> number of the specified driver log. The default value is <span class="parmvalue" id="dli_02_0128__parmvalue184234335816"><b>0</b></span>. This parameter must be used together with the <span class="parmname" id="dli_02_0128__parmname139741452613"><b>type</b></span> parameter. If only <span class="parmname" id="dli_02_0128__parmname43211016145817"><b>index</b></span> is specified, the default value of <span class="parmname" id="dli_02_0128__parmname175587224587"><b>type</b></span> is <span class="parmvalue" id="dli_02_0128__parmvalue17463152917585"><b>driver</b></span>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_section20458182103"><h4 class="sectiontitle">Request</h4><p id="dli_02_0128__p1240122618443">None</p>
|
|
</div>
|
|
<div class="section" id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_sd1ecb66580054b2ea403be8b2272a2c7"><h4 class="sectiontitle">Response</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_table1391425172812" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_row239272520282"><th align="left" class="cellrowborder" valign="top" width="9.66%" id="mcps1.3.4.2.2.5.1.1"><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_p73934250283">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.510000000000002%" id="mcps1.3.4.2.2.5.1.2"><p id="dli_02_0128__p671919142279">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.72%" id="mcps1.3.4.2.2.5.1.3"><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_p93931525182819">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60.11%" id="mcps1.3.4.2.2.5.1.4"><p id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_p339412542814">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0128__en-us_topic_0103345066_row63379595162513"><td class="cellrowborder" valign="top" width="9.66%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0128__en-us_topic_0103345066_p50256728162513">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.510000000000002%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0128__p57191314112713">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.72%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0128__en-us_topic_0103345066_p44263180162513">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.11%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0128__en-us_topic_0103345066_p28547791162513">ID of a batch processing job.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0128__en-us_topic_0103345066_row66694500162513"><td class="cellrowborder" valign="top" width="9.66%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0128__en-us_topic_0103345066_p7592495162513">from</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.510000000000002%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0128__p77191014152719">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.72%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0128__en-us_topic_0103345066_p11012339162513">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.11%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0128__en-us_topic_0103345066_p19584260162513">Start index of a log.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0128__en-us_topic_0103345066_row59606283162513"><td class="cellrowborder" valign="top" width="9.66%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0128__en-us_topic_0103345066_p49846418162513">total</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.510000000000002%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0128__p12719614172710">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.72%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0128__en-us_topic_0103345066_p11028097162513">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.11%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0128__en-us_topic_0103345066_p20860697162513">Total number of records in a log.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0128__en-us_topic_0103345066_row28992541162513"><td class="cellrowborder" valign="top" width="9.66%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0128__en-us_topic_0103345066_p40845066162513">log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.510000000000002%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0128__p15719614192713">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.72%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0128__en-us_topic_0103345066_p20116078162513">Array of Strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.11%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0128__en-us_topic_0103345066_p18789622162513">Log of the current batch processing job.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0128__section1217010661112"><h4 class="sectiontitle">Example Request</h4><p id="dli_02_0128__p6101181617111">None</p>
|
|
</div>
|
|
<div class="section" id="dli_02_0128__en-us_topic_0103345066_en-us_topic_0102902523_section17446171164041"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="dli_02_0128__en-us_topic_0103345066_screen61540078162924">{
|
|
"id": "0a324461-d9d9-45da-a52a-3b3c7a3d809e",
|
|
"from": 0,
|
|
"total": 3,
|
|
"log": [
|
|
"Detailed information about job logs"
|
|
]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="dli_02_0128__sf39cfd445ad24e9e82754fcb0027179d"><h4 class="sectiontitle">Status Codes</h4><p id="dli_02_0128__a04144ca3a08e4576b386c6a98f43a2ae"><a href="#dli_02_0128__tb12870f1c5f24b27abd55ca24264af36">Table 4</a> describes the status code.</p>
|
|
|
|
<div class="tablenoborder"><a name="dli_02_0128__tb12870f1c5f24b27abd55ca24264af36"></a><a name="tb12870f1c5f24b27abd55ca24264af36"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0128__tb12870f1c5f24b27abd55ca24264af36" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status codes</caption><thead align="left"><tr id="dli_02_0128__r8d54231f95b14c01a5e55e95f3b2e838"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.7.3.2.3.1.1"><p id="dli_02_0128__ab49d21f312644072a331f43e92baf853">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.7.3.2.3.1.2"><p id="dli_02_0128__aea1d3bd107bb4c499da79a88832d256c">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0128__r211ad4eb571d4d938e5579998723174e"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0128__a3153e07b3a9749adba92599fe6628fbf">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0128__p104431642124811">The query is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0128__row44937531727"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0128__p184941532219">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0128__p2049413539219">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0128__row65331212142411"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0128__p5537171216249">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0128__p953813124249">Internal service error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0128__section13596141025715"><h4 class="sectiontitle">Error Codes</h4><p id="dli_02_0128__p420584425712">If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see <a href="dli_02_0056.html">Error Code</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_02_0162.html">Batch Processing-related APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|