Yang, Tong 3f5759eed2 MRS comp-lts 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2023-01-19 17:08:45 +00:00

22 lines
5.8 KiB
HTML

<a name="mrs_01_1820"></a><a name="mrs_01_1820"></a>
<h1 class="topictitle1">Submitting a Hive2 Job</h1>
<div id="body8662426"><div class="section" id="mrs_01_1820__en-us_topic_0000001173471170_s6a90446d0ac84e90bb743f5c1d6f5ae4"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_1820__en-us_topic_0000001173471170_ad404bfb0df7d48b69a6b6648a0e56b4f">This section describes how to submit an Oozie job of the Hive2 type on the Hue web UI.</p>
</div>
<div class="section" id="mrs_01_1820__en-us_topic_0000001173471170_s1a160ce601444787b4b13b3fba603d83"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_1820__en-us_topic_0000001173471170_o2076901d53fe4745b049ac01df0d891f"><li id="mrs_01_1820__en-us_topic_0000001173471170_lce7709d029184a289e911ed58b1053ed"><span>Create a workflow. For details, see <a href="mrs_01_1818.html">Creating a Workflow</a>.</span></li><li id="mrs_01_1820__en-us_topic_0000001173471170_l0ba7fff9df714cac953ea2edda74bdcd"><span>On the workflow editing page, select <span><img id="mrs_01_1820__en-us_topic_0000001173471170_i053667e90ea3403fa2e06773b9b1e426" src="en-us_image_0000001349259093.jpg"></span> next to <span class="parmname" id="mrs_01_1820__en-us_topic_0000001173471170_parmname926292813417"><b>HiveServer2 Script</b></span> and drag it to the operation area.</span></li><li id="mrs_01_1820__en-us_topic_0000001173471170_l209a628919e84975a28c80c8bd3e1ddd"><span>In the <span class="wintitle" id="mrs_01_1820__en-us_topic_0000001173471170_wintitle029910404411"><b>HiveServer2 Script</b></span> dialog box that is displayed, configure the script path in the HDFS, for example, <span class="filepath" id="mrs_01_1820__en-us_topic_0000001173471170_filepath162998406414"><b>/user/admin/examples/apps/hive2/script.q</b></span>, and click <span class="uicontrol" id="mrs_01_1820__en-us_topic_0000001173471170_uicontrol11300174011411"><b>Add</b></span>.</span></li><li id="mrs_01_1820__en-us_topic_0000001173471170_l6af5bc7d7c1a4658b4ef55395d670dce"><span>Click <strong id="mrs_01_1820__en-us_topic_0000001173471170_b1656112014558">PARAMETER+</strong> to add input and output parameters.</span><p><p id="mrs_01_1820__en-us_topic_0000001173471170_a153568aaafbc4e35a51c2cc0a374885b">For example, if the input parameter is <span class="parmname" id="mrs_01_1820__en-us_topic_0000001173471170_parmname7955312413"><b>INPUT=/user/admin/examples/input-data/table</b></span>, the output parameter is <span class="parmname" id="mrs_01_1820__en-us_topic_0000001173471170_parmname2010353114115"><b>OUTPUT=/user/admin/examples/output-data/hive2_workflow</b></span>.</p>
<p id="mrs_01_1820__en-us_topic_0000001173471170_p5894173820486"><span><img id="mrs_01_1820__en-us_topic_0000001173471170_i7d3bb86cf59b4960924f8af660dae8a3" src="en-us_image_0000001296059796.png"></span></p>
</p></li><li id="mrs_01_1820__en-us_topic_0000001173471170_lc6a4127f3d1049fea224e83724460080"><span>Click the configuration button <span><img id="mrs_01_1820__en-us_topic_0000001173471170_iac9474f0e69e47c3a38113ace8b49610" src="en-us_image_0000001348739821.jpg"></span> in the upper right corner. On the configuration page that is displayed, click <span class="uicontrol" id="mrs_01_1820__en-us_topic_0000001173471170_uicontrol1573371810425"><b>Delete +</b></span> to delete a directory, for example, <span class="filepath" id="mrs_01_1820__en-us_topic_0000001173471170_filepath1573481816423"><b>/user/admin/examples/output-data/hive2_workflow</b></span>.</span></li><li id="mrs_01_1820__en-us_topic_0000001173471170_la1abc0b7251945be93e421e81fea2e5f"><span>Configure the job XML, for example, to the HDFS path <strong id="mrs_01_1820__en-us_topic_0000001173471170_b2742030194211">/user/admin/examples/apps/hive2/hive-site.xml</strong>.</span><p><div class="p" id="mrs_01_1820__en-us_topic_0000001173471170_p10723817154816"><span><img id="mrs_01_1820__en-us_topic_0000001173471170_image17548105785716" src="en-us_image_0000001348739817.png"></span><div class="note" id="mrs_01_1820__en-us_topic_0000001173471170_note11255163488"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_1820__en-us_topic_0000001173471170_p412511644820">If the preceding parameters and values are modified, you can query them in <span class="filepath" id="mrs_01_1820__en-us_topic_0000001173471170_filepath3125116154817"><b>Oozie client installation directory/oozie-client-<span id="mrs_01_1820__text147141023142715">*</span>/conf/hive-site.xml</b></span>.</p>
</div></div>
</div>
</p></li><li id="mrs_01_1820__en-us_topic_0000001173471170_la726d3587a3541cdb29454886c2c76a3"><span>Click <span><img id="mrs_01_1820__en-us_topic_0000001173471170_image1236335111194" src="en-us_image_0000001295899960.png"></span> in the upper right corner of the Oozie editor.</span><p><p id="mrs_01_1820__en-us_topic_0000001173471170_ada411845c04e45e1a85e12864b88f1fe">If you need to modify the job name before saving the job (default value: <span class="parmname" id="mrs_01_1820__en-us_topic_0000001173471170_parmname1158524705517"><b>My Workflow</b></span>), click the name directly for modification, for example, <strong id="mrs_01_1820__en-us_topic_0000001173471170_b358614479552">Hive2-Workflow</strong>.</p>
</p></li><li id="mrs_01_1820__en-us_topic_0000001173471170_l2bca876c0e534cfba9cb2adff83f1267"><span>After the configuration is saved, click <span><img id="mrs_01_1820__en-us_topic_0000001173471170_i999b101699bf47b585a47b4fd3fc2e64" src="en-us_image_0000001349059637.jpg"></span>, and submit the job.</span><p><p id="mrs_01_1820__en-us_topic_0000001173471170_a9e9254d90004418393ba5b1d2a286e4b">After the job is submitted, you can view the related contents of the job, such as the detailed information, logs, and processes, on Hue.</p>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1819.html">Submitting a Workflow Job</a></div>
</div>
</div>