forked from docs/doc-exports
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>
24 lines
5.1 KiB
HTML
24 lines
5.1 KiB
HTML
<a name="mrs_01_1826"></a><a name="mrs_01_1826"></a>
|
|
|
|
<h1 class="topictitle1">Submitting a Shell Job</h1>
|
|
<div id="body1591347174011"><div class="section" id="mrs_01_1826__s40a1a3b972534b649d80aeedc2d6ba55"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_1826__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__scd88532b81f84c3cbd05ba6f4c38a603"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_1826__obfd0782408474bb9b2584989903d694e"><li id="mrs_01_1826__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__l105e0e1992dc4202a5a43758f257d95b"><span>On the workflow editing page, select <span><img id="mrs_01_1826__i1bcef878ee9546f6a93482bc7ba515bf" src="en-us_image_0000001296249840.jpg"></span> next to <strong id="mrs_01_1826__b1443865218219">Shell</strong> and drag it to the operation area.</span></li><li id="mrs_01_1826__lfe10b792ca7143049e345f23a7e959cd"><span>In the <strong id="mrs_01_1826__b10633152220">Shell</strong> window that is displayed, set <span class="parmname" id="mrs_01_1826__parmname16864107182311"><b>Shell command</b></span>, for example, to <strong id="mrs_01_1826__b66421132214">oozie_shell.sh</strong>, and click <strong id="mrs_01_1826__b365111192212">Add</strong>.</span></li><li id="mrs_01_1826__li14112041154716"><span>Click <strong id="mrs_01_1826__b038733010113">FILE+</strong> to add the Shell command execution file or Oozie example execution file. You can select a file stored in HDFS or a local file.</span><p><ul id="mrs_01_1826__ul71833117483"><li id="mrs_01_1826__li518301174812">If the file is stored in HDFS, select the path of the <strong id="mrs_01_1826__b1297119230129">.sh</strong> file, for example, <strong id="mrs_01_1826__b15751231151219">user/hueuser/shell/oozie_shell.sh</strong>.<p id="mrs_01_1826__p550802719553"><span><img id="mrs_01_1826__image6508182735510" src="en-us_image_0000001296090188.png"></span></p>
|
|
</li><li id="mrs_01_1826__li196412430500">If you select a local file, click <strong id="mrs_01_1826__b1319919296419">Upload a file</strong> on the <strong id="mrs_01_1826__b3112642954">Choose a file</strong> page to upload the local file. After the file is uploaded, select the file.</li></ul>
|
|
</p></li><li id="mrs_01_1826__li123101945152413"><span>If the shell file to be executed needs to transfer parameters, click <strong id="mrs_01_1826__b750013131613">ARGUMENTS+</strong> to set parameters.</span><p><p id="mrs_01_1826__p14342029192717"><span><img id="mrs_01_1826__image193442912271" src="en-us_image_0000001348770221.png"></span></p>
|
|
<div class="note" id="mrs_01_1826__note343091414281"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_1826__p7382103412713">The sequence of transferring parameters must be the same as that in the shell script.</p>
|
|
</div></div>
|
|
</p></li><li id="mrs_01_1826__lc6bf928469e34c61988ddfa9ad20426f"><span>Click <span><img id="mrs_01_1826__image1236335111194" src="en-us_image_0000001295770400.png"></span> in the upper right corner of the Oozie editor.</span><p><p id="mrs_01_1826__a8c68dc95510c4b5c9f558a73a89c73f9">If you need to modify the job name before saving the job (default value: <span class="parmname" id="mrs_01_1826__parmname930192217224"><b>My Workflow</b></span>), click the name directly for modification, for example, <strong id="mrs_01_1826__b12364225221">Shell-Workflow</strong>.</p>
|
|
</p></li><li id="mrs_01_1826__l1e81f0df23c948dcbf87e6095a5826c0"><span>After the configuration is saved, click <span><img id="mrs_01_1826__i4450a9547cab4456bf00a754f8c737b7" src="en-us_image_0000001295930364.jpg"></span>, and submit the job.</span><p><p id="mrs_01_1826__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__ncc563539fa2143c7b14fc044d42a8322"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_1826__u88a00b7ee98841ba98731c4ff719775a"><li id="mrs_01_1826__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__b535084416248">ls -l</strong> to <strong id="mrs_01_1826__b09811619172415">ll</strong>. You can configure it as the shell command <strong id="mrs_01_1826__b9784369246">ls</strong>, and add a parameter <strong id="mrs_01_1826__b94971344162419">-l</strong>.</li><li id="mrs_01_1826__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>
|
|
|