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

19 lines
4.7 KiB
HTML

<a name="mrs_01_1826"></a><a name="mrs_01_1826"></a>
<h1 class="topictitle1">Submitting a Shell Job</h1>
<div id="body8662426"><div class="section" id="mrs_01_1826__en-us_topic_0000001173949270_s40a1a3b972534b649d80aeedc2d6ba55"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_1826__en-us_topic_0000001173949270_a80c6fe0cbdac4b678ffd3ced6a327048">This section describes how to submit an Oozie job of the Shell type on the Hue web UI.</p>
</div>
<div class="section" id="mrs_01_1826__en-us_topic_0000001173949270_scd88532b81f84c3cbd05ba6f4c38a603"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_1826__en-us_topic_0000001173949270_obfd0782408474bb9b2584989903d694e"><li id="mrs_01_1826__en-us_topic_0000001173949270_l72f71c6debee40659d66386d3797ec1d"><span>Create a workflow. For details, see <a href="mrs_01_1818.html">Creating a Workflow</a>.</span></li><li id="mrs_01_1826__en-us_topic_0000001173949270_l105e0e1992dc4202a5a43758f257d95b"><span>On the workflow editing page, select <span><img id="mrs_01_1826__en-us_topic_0000001173949270_i1bcef878ee9546f6a93482bc7ba515bf" src="en-us_image_0000001349059905.jpg"></span> next to <strong id="mrs_01_1826__en-us_topic_0000001173949270_b1443865218219">Shell</strong> and drag it to the operation area.</span></li><li id="mrs_01_1826__en-us_topic_0000001173949270_lfe10b792ca7143049e345f23a7e959cd"><span>In the <strong id="mrs_01_1826__en-us_topic_0000001173949270_b10633152220">Shell</strong> window that is displayed, set <span class="parmname" id="mrs_01_1826__en-us_topic_0000001173949270_parmname16864107182311"><b>Shell command</b></span>, for example, to <strong id="mrs_01_1826__en-us_topic_0000001173949270_b66421132214">oozie_shell.sh</strong>, and click <strong id="mrs_01_1826__en-us_topic_0000001173949270_b365111192212">Add</strong>.</span></li><li id="mrs_01_1826__en-us_topic_0000001173949270_l109b0f2eca58461da4d767516794df8e"><span>Click <strong id="mrs_01_1826__en-us_topic_0000001173949270_b1924517316229">FILE+</strong> to add the Shell command execution file and Oozie example execution file, for example, <strong id="mrs_01_1826__en-us_topic_0000001173949270_b1230131812227">/user/admin/examples/apps/shell/oozie_shell.sh</strong>.</span></li><li id="mrs_01_1826__en-us_topic_0000001173949270_lc6bf928469e34c61988ddfa9ad20426f"><span>Click <span><img id="mrs_01_1826__en-us_topic_0000001173949270_image1236335111194" src="en-us_image_0000001295740256.png"></span> in the upper right corner of the Oozie editor.</span><p><p id="mrs_01_1826__en-us_topic_0000001173949270_a8c68dc95510c4b5c9f558a73a89c73f9">If you need to modify the job name before saving the job (default value: <span class="parmname" id="mrs_01_1826__en-us_topic_0000001173949270_parmname930192217224"><b>My Workflow</b></span>), click the name directly for modification, for example, <strong id="mrs_01_1826__en-us_topic_0000001173949270_b12364225221">Shell-Workflow</strong>.</p>
</p></li><li id="mrs_01_1826__en-us_topic_0000001173949270_l1e81f0df23c948dcbf87e6095a5826c0"><span>After the configuration is saved, click <span><img id="mrs_01_1826__en-us_topic_0000001173949270_i4450a9547cab4456bf00a754f8c737b7" src="en-us_image_0000001349259357.jpg"></span>, and submit the job.</span><p><p id="mrs_01_1826__en-us_topic_0000001173949270_a51f6d8b8e2ec475eb1b7a3e4e31444cf">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>
<div class="note" id="mrs_01_1826__en-us_topic_0000001173949270_ncc563539fa2143c7b14fc044d42a8322"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_1826__en-us_topic_0000001173949270_u88a00b7ee98841ba98731c4ff719775a"><li id="mrs_01_1826__en-us_topic_0000001173949270_l5b37454f6860435c899183f61bc68a7c">When configuring a shell command as a Linux command, specify it as the original command instead of the shortcut key command. For example, do not set <strong id="mrs_01_1826__en-us_topic_0000001173949270_b535084416248">ls -l</strong> to <strong id="mrs_01_1826__en-us_topic_0000001173949270_b09811619172415">ll</strong>. You can configure it as the shell command <strong id="mrs_01_1826__en-us_topic_0000001173949270_b9784369246">ls</strong>, and add a parameter <strong id="mrs_01_1826__en-us_topic_0000001173949270_b94971344162419">-l</strong>.</li><li id="mrs_01_1826__en-us_topic_0000001173949270_li12342911164">When uploading the shell script to HDFS on Windows, make sure that the shell script format is Unix. If the format is incorrect, the shell job fails to be submitted.</li></ul>
</div></div>
</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>