doc-exports/docs/mrs/api-ref/mrs_02_0040.html
Yang, Tong bd2b57f749 MRS API 2.0.38.SP20 version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-11-16 15:06:08 +00:00

725 lines
54 KiB
HTML

<a name="mrs_02_0040"></a><a name="mrs_02_0040"></a>
<h1 class="topictitle1">Adding a Job and Executing the Job</h1>
<div id="body1480125376815"><div class="section" id="mrs_02_0040__section4408504619327"><h4 class="sectiontitle">Function</h4><p id="mrs_02_0040__p5843728119329">This API is used to add a job to an MRS cluster and execute the job. This API is incompatible with Sahara.</p>
</div>
<div class="section" id="mrs_02_0040__section10186656193217"><h4 class="sectiontitle">URI</h4><ul id="mrs_02_0040__ul2809877319471"><li id="mrs_02_0040__li5177607319471">Format<p id="mrs_02_0040__p59483855194713"><a name="mrs_02_0040__li5177607319471"></a><a name="li5177607319471"></a>POST /v1.1/{project_id}/jobs/submit-job</p>
</li><li id="mrs_02_0040__li2957566119471">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0040__table49499141194754" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter description</caption><thead align="left"><tr id="mrs_02_0040__row33700024194754"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="mrs_02_0040__p16571835194812">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="mrs_02_0040__p141410194812">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="mrs_02_0040__p11454278194812">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0040__row39786771142917"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0040__p1503055142917">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0040__p54638598142917">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0040__p63650338142917">Project ID. For details on how to obtain the project ID, see <a href="mrs_02_0011.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="mrs_02_0040__section673761354213"><h4 class="sectiontitle">Request</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0040__table46210785193317" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameter description</caption><thead align="left"><tr id="mrs_02_0040__row34262165193317"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.2.5.1.1"><p id="mrs_02_0040__p12621391193317">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.2.2.5.1.2"><p id="mrs_02_0040__p15699711193317">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.2.2.5.1.3"><p id="mrs_02_0040__p562413019313">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.3.2.2.5.1.4"><p id="mrs_02_0040__p63717051193317">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0040__row36582554193317"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0040__p10396884193317">job_type</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0040__p36841295193317">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0040__p346461129313">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0040__p32476122205057">Job type code</p>
<ul id="mrs_02_0040__ul5947149515590"><li id="mrs_02_0040__li6488797415590">1: MapReduce</li><li id="mrs_02_0040__li5869295015590">2: Spark</li><li id="mrs_02_0040__li1378917415590">3: Hive Script</li><li id="mrs_02_0040__li802328715590">4: HiveQL (not supported currently)</li><li id="mrs_02_0040__li33888041111020">5: DistCp, importing and exporting data. For details, see <a href="#mrs_02_0040__table3863810010324">Table 3</a>.</li><li id="mrs_02_0040__li48044655111024">6: Spark Script</li><li id="mrs_02_0040__li7152765111027">7: Spark SQL, submitting Spark SQL statements. For details, see <a href="#mrs_02_0040__table63617887103233">Table 4</a>. (Not supported in this API currently.)<div class="note" id="mrs_02_0040__note4514581911127"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_02_0040__p365918811127">Spark and Hive jobs can be added to only clusters that include Spark and Hive components.</p>
</div></div>
</li></ul>
</td>
</tr>
<tr id="mrs_02_0040__row57932449102743"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0040__p62016791102743">job_name</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0040__p57304145102743">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0040__p277864793547">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0040__p1370122345910">Job name</p>
<p id="mrs_02_0040__p29070416105535">Contains only 1 to 64 letters, digits, hyphens (-), and underscores (_).</p>
<div class="note" id="mrs_02_0040__note60307154105535"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_02_0040__p5893482105535">Identical job names are allowed but not recommended.</p>
</div></div>
</td>
</tr>
<tr id="mrs_02_0040__row12562929114736"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0040__p10964343114736">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0040__p15696597114736">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0040__p63464884114736">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0040__p40382012114736">Cluster ID</p>
</td>
</tr>
<tr id="mrs_02_0040__row8742005193317"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0040__p4203226995210">jar_path</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0040__p4917062595210">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0040__p154217579313">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0040__p1712419591545">Path of the JAR or SQL file for program execution</p>
<p id="mrs_02_0040__p201991940546">The parameter must meet the following requirements:</p>
<ul id="mrs_02_0040__ul28108739105445"><li id="mrs_02_0040__li51652067105445">Contains a maximum of 1,023 characters, excluding special characters such as ;|&amp;&gt;&lt;'$. The address cannot be empty or full of spaces.</li><li id="mrs_02_0040__li62215423105445">Starts with <span class="parmvalue" id="mrs_02_0040__parmvalue1813934163"><b>/</b></span> or <span class="parmvalue" id="mrs_02_0040__parmvalue13130347617"><b>s3a://</b></span>. The OBS path does not support files or programs encrypted by KMS.</li><li id="mrs_02_0040__li39280082105445">Spark Script must end with <span class="parmvalue" id="mrs_02_0040__parmvalue17976426105445"><b>.sql</b></span> while MapReduce and Spark Jar must end with <span class="parmvalue" id="mrs_02_0040__parmvalue27570107105445"><b>.jar</b></span>.<strong id="mrs_02_0040__b13627621162918">sql</strong> and <strong id="mrs_02_0040__b848112303292">jar</strong> are case-insensitive.</li></ul>
</td>
</tr>
<tr id="mrs_02_0040__row4788257010284"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0040__p881779095210">arguments</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0040__p4315240795210">No</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0040__p412027909313">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0040__p568404895210">Key parameter for program execution. The parameter is specified by the function of the user's program. MRS is only responsible for loading the parameter.</p>
<p id="mrs_02_0040__p5115643295210">The parameter contains a maximum of 2,047 characters, excluding special characters such as ;|&amp;&gt;'&lt;$, and can be left blank.</p>
<div class="note" id="mrs_02_0040__note62371709174814"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_02_0040__p20521095174814">When entering a parameter containing sensitive information (for example, login password), you can add an at sign (@) before the parameter name to encrypt the parameter value. This prevents the sensitive information from being persisted in plaintext. Therefore, when you view job information on the MRS, sensitive information will be displayed as asterisks (*).</p>
<p id="mrs_02_0040__p1265001117571">For example, username=admin @password=admin_123.</p>
</div></div>
</td>
</tr>
<tr id="mrs_02_0040__row22945661205631"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0040__p4761952395210">input</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0040__p3197614195210">No</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0040__p490916929313">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0040__p3993064895210">Path for inputting data, which must start with <span class="parmvalue" id="mrs_02_0040__parmvalue178840111121"><b>/</b></span> or <span class="parmvalue" id="mrs_02_0040__parmvalue888551101218"><b>s3a://</b></span>. Set this parameter to a correct OBS path. The OBS path does not support files or programs encrypted by KMS.</p>
<p id="mrs_02_0040__p5908955195210">The parameter contains a maximum of 1,023 characters, excluding special characters such as ;|&amp;&gt;'&lt;$, and can be left blank.</p>
</td>
</tr>
<tr id="mrs_02_0040__row4446769920575"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0040__p2252515695210">output</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0040__p1259835495210">No</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0040__p170040869313">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0040__p1383379395210">Path for outputting data, which must start with <span class="parmvalue" id="mrs_02_0040__parmvalue14409181161310"><b>/</b></span> or <span class="parmvalue" id="mrs_02_0040__parmvalue04101911161318"><b>s3a://</b></span>. A correct OBS path is required. If the path does not exist, the system automatically creates it.</p>
<p id="mrs_02_0040__p3233760195210">The parameter contains a maximum of 1,023 characters, excluding special characters such as ;|&amp;&gt;'&lt;$, and can be left blank.</p>
</td>
</tr>
<tr id="mrs_02_0040__row3637816111569"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0040__p654800595210">job_log</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0040__p6062642495210">No</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0040__p351537089313">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0040__p1179329195210">Path for storing job logs that record job running status. The path must start with <span class="parmvalue" id="mrs_02_0040__parmvalue1863110314147"><b>/</b></span> or <span class="parmvalue" id="mrs_02_0040__parmvalue363163119143"><b>s3a://</b></span>. A correct OBS path is required.</p>
<p id="mrs_02_0040__p6637185895210">The parameter contains a maximum of 1,023 characters, excluding special characters such as ;|&amp;&gt;'&lt;$, and can be left blank.</p>
</td>
</tr>
<tr id="mrs_02_0040__row14131383162346"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0040__p59697381162356">hive_script_path</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0040__p3649694162356">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0040__p211278519313">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0040__p27189832162356">SQL program path</p>
<p id="mrs_02_0040__p111345215159">This parameter is needed by Spark Script and Hive Script jobs only, and must meet the following requirements:</p>
<ul id="mrs_02_0040__ul43381903162356"><li id="mrs_02_0040__li54892811162356">Contains a maximum of 1,023 characters, excluding special characters such as ;|&amp;&gt;&lt;'$. The address cannot be empty or full of spaces.</li><li id="mrs_02_0040__li24273253162356">The path must start with <span class="parmvalue" id="mrs_02_0040__parmvalue17132686162356"><b>/</b></span> or <span class="parmvalue" id="mrs_02_0040__parmvalue48129207151559"><b>s3a://</b></span>. The OBS path does not support files or programs encrypted by KMS.</li><li id="mrs_02_0040__li7479493162356">The path must end with <span class="parmvalue" id="mrs_02_0040__parmvalue206581162356"><b>.sql</b></span>.<strong id="mrs_02_0040__b1350611312346">sql</strong> is case-insensitive.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="mrs_02_0040__table3863810010324"></a><a name="table3863810010324"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0040__table3863810010324" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="mrs_02_0040__b156847397168">DistCp</strong> parameter description</caption><thead align="left"><tr id="mrs_02_0040__row4533068110324"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.3.2.5.1.1"><p id="mrs_02_0040__p54968585103616">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.3.2.5.1.2"><p id="mrs_02_0040__p23270363103616">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.3.2.5.1.3"><p id="mrs_02_0040__p21293140163428">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.3.3.2.5.1.4"><p id="mrs_02_0040__p5851266103616">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0040__row6178122510324"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_02_0040__p3822335110324">job_name</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_02_0040__p908370110324">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_02_0040__p47022802163428">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_02_0040__p7709151120184">Job name</p>
<p id="mrs_02_0040__p3280503011050">Contains only 1 to 64 letters, digits, hyphens (-), and underscores (_).</p>
<div class="note" id="mrs_02_0040__note2680982011050"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_02_0040__p3996179411050">Identical job names are allowed but not recommended.</p>
</div></div>
</td>
</tr>
<tr id="mrs_02_0040__row4534941510324"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_02_0040__p4942398910324">input</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_02_0040__p55067941103719">No</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_02_0040__p50750592163428">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_02_0040__p76447910324">Data source path</p>
<ul id="mrs_02_0040__ul562023841145"><li id="mrs_02_0040__li324389471145">When you import data, the parameter is set to an OBS path. Files or programs encrypted by KMS are not supported.</li><li id="mrs_02_0040__li297264061145">When you export data, the parameter is set to an HDFS path.</li></ul>
</td>
</tr>
<tr id="mrs_02_0040__row688031410324"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_02_0040__p2043453110324">output</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_02_0040__p62056516103719">No</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_02_0040__p17157254163428">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_02_0040__p5455659810324">Data receiving path</p>
<ul id="mrs_02_0040__ul226832311445"><li id="mrs_02_0040__li2041491511445">When you import data, the parameter is set to an HDFS path.</li><li id="mrs_02_0040__li4951650911445">When you export data, the parameter is set to an OBS path.</li></ul>
</td>
</tr>
<tr id="mrs_02_0040__row2124733610324"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_02_0040__p4331269410324">file_action</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_02_0040__p4838819103719">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_02_0040__p47560333163428">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_02_0040__p3565927110324">Types of file operations, including:</p>
<ul id="mrs_02_0040__ul3995823810380"><li id="mrs_02_0040__li75954510380">export: Export data from HDFS to OBS.</li><li id="mrs_02_0040__li1731953910380">import: Import data from OBS to HDFS.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="mrs_02_0040__table63617887103233"></a><a name="table63617887103233"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0040__table63617887103233" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="mrs_02_0040__b6336155312191">Spark SQL</strong> parameter description</caption><thead align="left"><tr id="mrs_02_0040__row55179475103233"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.4.2.5.1.1"><p id="mrs_02_0040__p27628366103233">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.4.2.5.1.2"><p id="mrs_02_0040__p23305207103233">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.4.2.5.1.3"><p id="mrs_02_0040__p41131944163327">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.3.4.2.5.1.4"><p id="mrs_02_0040__p8673620103233">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0040__row10953722103233"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.4.2.5.1.1 "><p id="mrs_02_0040__p14836289103233">hql</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.4.2.5.1.2 "><p id="mrs_02_0040__p60888752103233">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.4.2.5.1.3 "><p id="mrs_02_0040__p43353145163327">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.4.2.5.1.4 "><p id="mrs_02_0040__p50684616114137">Spark SQL statement, which needs Base64 encoding and decoding. <span class="filepath" id="mrs_02_0040__filepath4134175520335"><b>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/</b></span> is a standard encoding table. MRS uses <span class="filepath" id="mrs_02_0040__filepath35726041203311"><b>ABCDEFGHILKJMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/</b></span> for Base64 encoding. The value of the <strong id="mrs_02_0040__b489803433714">hql</strong> parameter is generated by adding any letter to the beginning of the encoded character string. The Spark SQL statement is generated by decoding the value in the background.</p>
<p id="mrs_02_0040__p12634970201250">Example:</p>
<ol id="mrs_02_0040__ol15229821202518"><li id="mrs_02_0040__li19121725279">Obtain the Base64 encoding tool.</li><li id="mrs_02_0040__li6857651202518">Enter the <span class="parmvalue" id="mrs_02_0040__parmvalue2598081203133"><b>show tables;</b></span> Spark SQL statement in the encoding tool to perform Base64 encoding.</li><li id="mrs_02_0040__li49135654202540">Obtain the encoded character string <span class="parmvalue" id="mrs_02_0040__parmvalue43189727152156"><b>c2hvdyB0YWLsZXM7</b></span>.</li><li id="mrs_02_0040__li642847269217">At the beginning of <span class="parmvalue" id="mrs_02_0040__parmvalue036417583374"><b>c2hvdyB0YWLsZXM7</b></span>, add any letter, for example, <strong id="mrs_02_0040__b187691171554">g</strong>. Then, the character string becomes <span class="parmname" id="mrs_02_0040__parmname63642583378"><b>gc2hvdyB0YWLsZXM7</b></span>, that is, the value of the <strong id="mrs_02_0040__b836455819376">hql</strong> parameter.</li></ol>
</td>
</tr>
<tr id="mrs_02_0040__row28941686103233"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.4.2.5.1.1 "><p id="mrs_02_0040__p62575218103233">job_name</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.4.2.5.1.2 "><p id="mrs_02_0040__p35427858103233">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.4.2.5.1.3 "><p id="mrs_02_0040__p21943888163327">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.4.2.5.1.4 "><p id="mrs_02_0040__p1069874511615">Job name. It contains 1 to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.</p>
<div class="note" id="mrs_02_0040__note2917984911615"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_02_0040__p6129204911615">Identical job names are allowed but not recommended.</p>
</div></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_02_0040__section775516131425"><h4 class="sectiontitle">Response</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0040__table95690185369" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response parameter description</caption><thead align="left"><tr id="mrs_02_0040__row8575818193612"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.4.1.1"><p id="mrs_02_0040__p4575181853612">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.4.1.2"><p id="mrs_02_0040__p145751818123617">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.2.4.1.3"><p id="mrs_02_0040__p25761518193614">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0040__row1057791893611"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0040__p1414612262381">job_execution</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0040__p16204192543610">Object</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0040__p1620522520368">For details, see <a href="#mrs_02_0040__table12040613193927">Table 6</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="mrs_02_0040__table12040613193927"></a><a name="table12040613193927"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0040__table12040613193927" frame="border" border="1" rules="all"><caption><b>Table 6 </b><strong id="mrs_02_0040__b3965201413289">job_execution</strong> parameter description</caption><thead align="left"><tr id="mrs_02_0040__row8843854193927"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="mrs_02_0040__p45263556193927">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="mrs_02_0040__p1907984993927">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="mrs_02_0040__p17473879193927">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0040__row8387056194027"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p20048170121940">templated</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p5273559121940">Bool</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p27667593121940">Whether job execution objects are generated by job templates.</p>
</td>
</tr>
<tr id="mrs_02_0040__row21668190121640"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p10292970121640">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p20661971121640">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p63006977121640">Creation time, which is a 10-bit timestamp.</p>
</td>
</tr>
<tr id="mrs_02_0040__row42904543121649"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p52715992121649">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p57651023121649">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p39221277121649">Update time, which is a 10-bit timestamp.</p>
</td>
</tr>
<tr id="mrs_02_0040__row22471936121656"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p8287516121656">id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p16212648121656">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p38156137121656">Job ID</p>
</td>
</tr>
<tr id="mrs_02_0040__row24499372121723"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p38292125121723">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p18955520141536">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p1768719515356">Project ID. For details on how to obtain the project ID, see <a href="mrs_02_0011.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="mrs_02_0040__row2857708612175"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p3304262412175">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p53035375141554">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p898100141554">Job application ID</p>
</td>
</tr>
<tr id="mrs_02_0040__row32761734121731"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p36454768121731">job_name</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p5357472814169">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p4458571514169">Job name</p>
</td>
</tr>
<tr id="mrs_02_0040__row34637547121713"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p54177922121713">input_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p58298059142036">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p24522334142036">Data input ID</p>
</td>
</tr>
<tr id="mrs_02_0040__row52362323121740"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p13489802121740">output_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p25824096142036">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p11377013142036">Data output ID</p>
</td>
</tr>
<tr id="mrs_02_0040__row23099520121823"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p59121852121823">start_time</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p1602626141644">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p62703864141644">Start time of job execution, which is a 10-bit timestamp.</p>
</td>
</tr>
<tr id="mrs_02_0040__row44209130121746"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p24169774121746">end_time</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p9981156141644">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p3167337141644">End time of job execution, which is a 10-bit timestamp.</p>
</td>
</tr>
<tr id="mrs_02_0040__row19333868121844"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p22539448121844">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p40496279121844">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p58973177121844">Cluster ID</p>
</td>
</tr>
<tr id="mrs_02_0040__row64101544121932"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p24842601121932">engine_job_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p51989737121932">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p50419192121932">Workflow ID of Oozie</p>
</td>
</tr>
<tr id="mrs_02_0040__row40913530121914"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p25661615121914">return_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p56829523121914">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p39788690121914">Returned code for an execution result</p>
</td>
</tr>
<tr id="mrs_02_0040__row42426498121924"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p13994348121924">is_public</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p11996722121924">Bool</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p32210397121924">Whether a job is public</p>
<ul id="mrs_02_0040__ul30570541161523"><li id="mrs_02_0040__li6699418161523">true</li><li id="mrs_02_0040__li60294765161523">false</li></ul>
<p id="mrs_02_0040__p5781975161523">The current version does not support this function.</p>
</td>
</tr>
<tr id="mrs_02_0040__row64146966121851"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p28521772121851">is_protected</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p31837065121851">Bool</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p28665505121851">Whether a job is protected</p>
<ul id="mrs_02_0040__ul34999201161533"><li id="mrs_02_0040__li46557354161533">true</li><li id="mrs_02_0040__li16363009161533">false</li></ul>
<p id="mrs_02_0040__p13049358161533">The current version does not support this function.</p>
</td>
</tr>
<tr id="mrs_02_0040__row2588379712190"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p1621284512190">group_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p63148421141951">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p14748509141951">Group ID of a job</p>
</td>
</tr>
<tr id="mrs_02_0040__row2381680812197"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p5011328212197">jar_path</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p5429436914200">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p3576773514200">Path of the <strong id="mrs_02_0040__b177514235467">.jar</strong> file for program execution</p>
</td>
</tr>
<tr id="mrs_02_0040__row1756817121813"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p8084509121813">input</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p61444593142016">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p10956159142016">Address for inputting data</p>
</td>
</tr>
<tr id="mrs_02_0040__row1372989312184"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p3837955812184">output</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p1085221142016">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p20794095142016">Address for outputting data</p>
</td>
</tr>
<tr id="mrs_02_0040__row34000642121755"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p2588600121755">job_log</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p41520902142110">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p7749910142110">Address for storing job logs</p>
</td>
</tr>
<tr id="mrs_02_0040__row2501321914242"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p1280482614242">job_type</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p12539997142110">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p9106851142110">Job type code</p>
<ul id="mrs_02_0040__ul14852800142110"><li id="mrs_02_0040__li66566337142110">1: MapReduce</li><li id="mrs_02_0040__li62226129142110">2: Spark</li><li id="mrs_02_0040__li23164256142110">3: Hive Script</li><li id="mrs_02_0040__li7151720142110">4: HiveQL (not supported currently)</li><li id="mrs_02_0040__li64365480142110">5: DistCp</li><li id="mrs_02_0040__li42418410142110">6: Spark Script</li><li id="mrs_02_0040__li46221376142110">7: Spark SQL (not supported in this API currently)</li></ul>
</td>
</tr>
<tr id="mrs_02_0040__row5695735714252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p5014324414252">file_action</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p31897142128">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p2583722142128">Data import and export</p>
</td>
</tr>
<tr id="mrs_02_0040__row2097336914259"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p2112133014259">arguments</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p26217341142148">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p43229902142148">Key parameter for program execution. The parameter is specified by the function of the user's internal program. MRS is only responsible for loading the parameter. This parameter can be empty.</p>
</td>
</tr>
<tr id="mrs_02_0040__row624173961439"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p226442851439">job_state</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p6666243914228">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p3094845114228">Job status code</p>
<ul id="mrs_02_0040__ul13080661695"><li id="mrs_02_0040__li5045410016531">-1: Terminated</li><li id="mrs_02_0040__li421695916541">1: Starting</li><li id="mrs_02_0040__li2413829616549">2: Running</li><li id="mrs_02_0040__li2147360716558">3: Completed</li><li id="mrs_02_0040__li445858461668">4: Abnormal</li><li id="mrs_02_0040__li48380511657">5: Error</li></ul>
</td>
</tr>
<tr id="mrs_02_0040__row4846002714355"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p3294814314355">job_final_status</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p2627918214228">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p25388152145857">Final job status</p>
<ul id="mrs_02_0040__ul27166780145857"><li id="mrs_02_0040__li43174433145857">0: unfinished</li><li id="mrs_02_0040__li53025585145857">1: terminated due to an execution error</li><li id="mrs_02_0040__li7468219145857">2: executed successfully</li><li id="mrs_02_0040__li105114145857">3: canceled</li></ul>
</td>
</tr>
<tr id="mrs_02_0040__row371401061445"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p555586001445">hive_script_path</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p55880059142240">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p29990897142240">Address of the Hive script</p>
</td>
</tr>
<tr id="mrs_02_0040__row1977685014520"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p5842105014520">create_by</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p52983467142240">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p63802438142240">User ID for creating jobs</p>
<p id="mrs_02_0040__p5897187514510">This parameter is not used in the current version, but is retained for compatibility with earlier versions.</p>
</td>
</tr>
<tr id="mrs_02_0040__row65069714440"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p5270649514440">finished_step</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p5534688142240">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p45656553142240">Number of completed steps</p>
<p id="mrs_02_0040__p2504751814513">This parameter is not used in the current version, but is retained for compatibility with earlier versions.</p>
</td>
</tr>
<tr id="mrs_02_0040__row5260952714511"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p3351325814511">job_main_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p6044962714230">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p6458165214230">Main ID of a job</p>
<p id="mrs_02_0040__p4059885114508">This parameter is not used in the current version, but is retained for compatibility with earlier versions.</p>
</td>
</tr>
<tr id="mrs_02_0040__row96030801453"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p396520331453">job_step_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p3671105514230">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p2080547814230">Step ID of a job</p>
<p id="mrs_02_0040__p30405496145012">This parameter is not used in the current version, but is retained for compatibility with earlier versions.</p>
</td>
</tr>
<tr id="mrs_02_0040__row1130301914455"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p4312932914455">postpone_at</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p59048414230">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p4782921914230">Delay time, which is a 10-bit timestamp.</p>
<p id="mrs_02_0040__p15159739144955">This parameter is not used in the current version, but is retained for compatibility with earlier versions.</p>
</td>
</tr>
<tr id="mrs_02_0040__row581419814447"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p118804214447">step_name</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p3800048714230">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p5814056814230">Step name of a job</p>
<p id="mrs_02_0040__p32873352145019">This parameter is not used in the current version, but is retained for compatibility with earlier versions.</p>
</td>
</tr>
<tr id="mrs_02_0040__row507987314414"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p881657214414">step_num</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p65588007142319">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p4812513145022">Number of steps</p>
<p id="mrs_02_0040__p11028364142319">This parameter is not used in the current version, but is retained for compatibility with earlier versions.</p>
</td>
</tr>
<tr id="mrs_02_0040__row132578714422"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p4027988414422">task_num</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p53722769142319">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p56577012142319">Number of tasks</p>
<p id="mrs_02_0040__p50694354145030">This parameter is not used in the current version, but is retained for compatibility with earlier versions.</p>
</td>
</tr>
<tr id="mrs_02_0040__row5130719714431"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p6224232214431">update_by</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p39799355142319">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p2522359142319">User ID for updating jobs</p>
</td>
</tr>
<tr id="mrs_02_0040__row473298451470"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p85122171470">credentials</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p25066895142337">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p17152630142337">Token</p>
<p id="mrs_02_0040__p197619271524">The current version does not support this function.</p>
</td>
</tr>
<tr id="mrs_02_0040__row5423502514712"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p3096092314712">user_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p6319581214712">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p1858712314712">User ID for creating jobs</p>
<p id="mrs_02_0040__p44645113144925">This parameter is not used in the current version, but is retained for compatibility with earlier versions.</p>
</td>
</tr>
<tr id="mrs_02_0040__row4512948014720"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p3160926714720">job_configs</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p33219872143521">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p6455092143521">Key-value pair set for saving job running configurations</p>
</td>
</tr>
<tr id="mrs_02_0040__row4615599914728"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p4764841414728">extra</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p8141885143521">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p10345716105310">Authentication information</p>
<p id="mrs_02_0040__p55512955143521">The current version does not support this function.</p>
</td>
</tr>
<tr id="mrs_02_0040__row3766101214740"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p3064311414740">data_source_urls</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p2299922143521">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p52075956143521">Data source URL</p>
</td>
</tr>
<tr id="mrs_02_0040__row6023152714753"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0040__p4691550114753">info</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0040__p46864266143521">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0040__p37909211143521">Key-value pair set, containing job running information returned by Oozie</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_02_0040__section1210015461189"><h4 class="sectiontitle">Example</h4><ul id="mrs_02_0040__ul1958913536182"><li id="mrs_02_0040__li1558945321814">Example request<p id="mrs_02_0040__p3664985016448"><a name="mrs_02_0040__li1558945321814"></a><a name="li1558945321814"></a>The following is an example of an MapReduce job request:</p>
<pre class="screen" id="mrs_02_0040__screen4823329416727">{
"job_type": 1,
"job_name": "mrs_test_jobone_20170602_141106",
"cluster_id": "e955a7a3-d334-4943-a39a-994976900d56",
"jar_path": "s3a://mrs-opsadm/jarpath/hadoop-mapreduce-examples-2.7.2.jar",
"arguments": "wordcount",
"input": "s3a://mrs-opsadm/input/",
"output": "s3a://mrs-opsadm/output/",
"job_log": "s3a://mrs-opsadm/log/",
"file_action": "",
"hql": "",
"hive_script_path": ""
}</pre>
<p id="mrs_02_0040__p6288394316646">The request example of Spark job:</p>
<pre class="screen" id="mrs_02_0040__screen732475416755">{
"job_type": 2,
"job_name": "mrs_test_sparkjob_20170602_141106",
"cluster_id": "e955a7a3-d334-4943-a39a-994976900d56",
"jar_path": "s3a://mrs-opsadm/jarpath/spark-test.jar",
"arguments": "org.apache.spark.examples.SparkPi 10",
"input": "",
"output": "s3a://mrs-opsadm/output/",
"job_log": "s3a://mrs-opsadm/log/",
"file_action": "",
"hql": "",
"hive_script_path": ""
}</pre>
<p id="mrs_02_0040__p6482728616743">The request example of Hive Script job:</p>
<pre class="screen" id="mrs_02_0040__screen3664510216818">{
"job_type": 3,
"job_name": "mrs_test_SparkScriptJob_20170602_141106",
"cluster_id": "e955a7a3-d334-4943-a39a-994976900d56",
"jar_path": "s3a://mrs-opsadm/jarpath/Hivescript.sql",
"arguments": "",
"input": "s3a://mrs-opsadm/input/",
"output": "s3a://mrs-opsadm/output/",
"job_log": "s3a://mrs-opsadm/log/",
"file_action": "",
"hql": "",
"hive_script_path": "s3a://mrs-opsadm/jarpath/Hivescript.sql"
}</pre>
<p id="mrs_02_0040__p664562381676">The request example of DistCp job for import:</p>
<pre class="screen" id="mrs_02_0040__screen1775469516858">{
"job_type": 5,
"job_name": "mrs_test_importjob_20170602_141106",
"cluster_id": "e955a7a3-d334-4943-a39a-994976900d56",
"input": "s3a://mrs-opsadm/jarpath/hadoop-mapreduce-examples-2.7.2.jar",
"output": "/user",
"file_action": "import"
}</pre>
<p id="mrs_02_0040__p3682342616852">The request example of DistCp job for export:</p>
<pre class="screen" id="mrs_02_0040__screen3750675616957">{
"job_type": 5,
"job_name": "mrs_test_exportjob_20170602_141106",
"cluster_id": "e955a7a3-d334-4943-a39a-994976900d56",
"input": "/user/hadoop-mapreduce-examples-2.7.2.jar",
"output": "s3a://mrs-opsadm/jarpath/",
"file_action": "export"
}</pre>
<p id="mrs_02_0040__p3250619216937">The request example of Spark Script job:</p>
<pre class="screen" id="mrs_02_0040__screen62519675161019">{
"job_type": 6,
"job_name": "mrs_test_sparkscriptjob_20170602_141106",
"cluster_id": "e955a7a3-d334-4943-a39a-994976900d56",
"jar_path": "s3a://mrs-opsadm/jarpath/sparkscript.sql",
"arguments": "",
"input": "s3a://mrs-opsadm/input/",
"output": "s3a://mrs-opsadm/output/",
"job_log": "s3a://mrs-opsadm/log/",
"file_action": "",
"hql": "",
"hive_script_path": "s3a://mrs-opsadm/jarpath/sparkscript.sql"
}</pre>
</li><li id="mrs_02_0040__li543710159193">Example response<pre class="screen" id="mrs_02_0040__screen47838920144744">{
"job_execution": {
"templated": false,
"created_at": 1496387588,
"updated_at": 1496387588,
"id": "12ee9ae4-6ee1-48c6-bb84-fb0b4f76cf03",
"tenant_id": "c71ad83a66c5470496c2ed6e982621cc",
"job_id": "",
"job_name": "mrs_test_jobone_20170602_141106",
"input_id": null,
"output_id": null,
"start_time": 1496387588,
"end_time": null,
"cluster_id": "e955a7a3-d334-4943-a39a-994976900d56",
"engine_job_id": null,
"return_code": null,
"is_public": null,
"is_protected": false,
"group_id": "12ee9ae4-6ee1-48c6-bb84-fb0b4f76cf03",
"jar_path": "s3a://mrs-opsadm/jarpath/hadoop-mapreduce-examples-2.7.2.jar",
"input": "s3a://mrs-opsadm/input/",
"output": "s3a://mrs-opsadm/output/",
"job_log": "s3a://mrs-opsadm/log/",
"job_type": 1,
"file_action": "",
"arguments": "wordcount",
"hql": "",
"job_state": 2,
"job_final_status": 0,
"hive_script_path": "",
"create_by": "b67132be2f054a45b247365647e05af0",
"finished_step": 0,
"job_main_id": "",
"job_step_id": "",
"postpone_at": 1496387588,
"step_name": "",
"step_num": 0,
"task_num": 0,
"update_by": "b67132be2f054a45b247365647e05af0",
"credentials": "",
"user_id": "b67132be2f054a45b247365647e05af0",
"job_configs": null,
"extra": null,
"data_source_urls": null,
"info": null
}
}</pre>
</li></ul>
</div>
<div class="section" id="mrs_02_0040__section4391766619434"><h4 class="sectiontitle">Status Code</h4><p id="mrs_02_0040__p5547365016031"><a href="#mrs_02_0040__table1584477916050">Table 7</a> describes the status code of this API.</p>
<div class="tablenoborder"><a name="mrs_02_0040__table1584477916050"></a><a name="table1584477916050"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0040__table1584477916050" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Status Code</caption><thead align="left"><tr id="mrs_02_0040__row1339492016050"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.6.3.2.3.1.1"><p id="mrs_02_0040__p3411176516050">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.6.3.2.3.1.2"><p id="mrs_02_0040__p1158961516050">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0040__row3719767816050"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.2.3.1.1 "><p id="mrs_02_0040__p6022194016050">200</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.6.3.2.3.1.2 "><p id="mrs_02_0040__p4613894216050">The job has been successfully added.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="mrs_02_0040__p1693116917524">For the description about error status codes, see <a href="mrs_02_0015.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_02_0039.html">Job Object APIs (V1, Not Recommended)</a></div>
</div>
</div>