Yang, Tong 6182f91ba8 MRS component operation guide_normal 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>
2022-12-09 14:55:21 +00:00

34 lines
6.1 KiB
HTML

<a name="mrs_01_1810"></a><a name="mrs_01_1810"></a>
<h1 class="topictitle1">Using the Oozie Client</h1>
<div id="body1591347168519"><div class="section" id="mrs_01_1810__s73cc65a7fbfb4321ab80199959561d37"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_1810__p31988244142918">This section describes how to use the Oozie client in an O&amp;M scenario or service scenario. </p>
</div>
<div class="section" id="mrs_01_1810__s2da0086f0bc84bb69150a5cd50f8a24f"><h4 class="sectiontitle">Prerequisites</h4><ul id="mrs_01_1810__ul85174425211"><li id="mrs_01_1810__l5bccbfc9af3b4643bd8aac6a2ba50381">The client has been installed. For example, the installation directory is <strong id="mrs_01_1810__b13031695810">/opt</strong><strong id="mrs_01_1810__b2013161586"></strong><strong id="mrs_01_1810__b100131617586">/client</strong>. The client directory in the following operations is only an example.</li></ul>
<ul id="mrs_01_1810__u6f74231be4d240e8a43d1631aed73288"><li id="mrs_01_1810__la8a352e20c414015a0e60f8023ecc0a5">Service component users are created by the administrator as required. In security mode, machine-machine users need to download the keytab file. A human-machine user must change the password upon the first login.</li></ul>
</div>
<div class="section" id="mrs_01_1810__s0af1abfd047941a29aaddd2a713d338b"><h4 class="sectiontitle">Using the Oozie Client</h4><ol id="mrs_01_1810__o8f383d142b304bd78240463e3853fcc9"><li id="mrs_01_1810__l6109f1763aad473e9edba417b410db5b"><span>Log in to the node where the client is installed as the client installation user.</span></li><li id="mrs_01_1810__l1cfc094e3573492b8624ed13e10e00f5"><span>Run the following command to switch to the client installation directory (change it to the actual installation directory):</span><p><p id="mrs_01_1810__a42ca79399e7d4e2fa6891cfe15b49a06"><strong id="mrs_01_1810__a5794dab6880b412f86fe90a137992e5b">cd /opt/client</strong></p>
</p></li><li id="mrs_01_1810__ldc4dc92d64ef41a78f0e483a058f6147"><span>Run the following command to configure environment variables:</span><p><p id="mrs_01_1810__a0f7284074ef6400eac7ed1a745a3ec6d"><strong id="mrs_01_1810__abfe8c835946f4d87855400af0df9a1e3">source bigdata_env</strong></p>
</p></li><li id="mrs_01_1810__lc10513c57e21483ab2a387e67e6f75d2"><span>Check the cluster authentication mode.</span><p><ul id="mrs_01_1810__u67315135e30d4f01b0f494e43d068f26"><li id="mrs_01_1810__lb3ba529a419944b09a3fb14b13c05ec4">If the cluster is in security mode, run the following command to authenticate the user: <em id="mrs_01_1810__i451021241415">exampleUser</em> indicates the name of the user who submits tasks.<p id="mrs_01_1810__a4da6b34e80fa48fd884a26cbcc0a01d5"><strong id="mrs_01_1810__a018e75eef98c47e6badc55c9dbe1cdc7">kinit</strong> <em id="mrs_01_1810__i68591727111815">exampleUser</em></p>
</li><li id="mrs_01_1810__l5b95727d0d1e4588980e699579974e31">If the cluster is in normal mode, go to <a href="#mrs_01_1810__li1585491617519">5</a>.</li></ul>
</p></li><li id="mrs_01_1810__li1585491617519"><a name="mrs_01_1810__li1585491617519"></a><a name="li1585491617519"></a><span>Perform the following operations to configure Hue:</span><p><ol type="a" id="mrs_01_1810__ol12859121181315"><li id="mrs_01_1810__li1069215552717">Configure the Spark2x environment (skip this step if the Spark2x task is not involved):<p id="mrs_01_1810__p6622185619715"><a name="mrs_01_1810__li1069215552717"></a><a name="li1069215552717"></a><strong id="mrs_01_1810__b6102184718819">hdfs dfs -put /opt/client/Spark2x/spark/jars/*.jar /user/oozie/share/lib/spark2x/</strong></p>
<p id="mrs_01_1810__p82699721319">When the JAR package in the HDFS directory <strong id="mrs_01_1810__b108846166297">/user/oozie/share</strong> changes, you need to restart the Oozie service.</p>
</li><li id="mrs_01_1810__li1803152871315">Upload the Oozie configuration file and JAR package to HDFS.<p id="mrs_01_1810__p3946938518147"><a name="mrs_01_1810__li1803152871315"></a><a name="li1803152871315"></a><strong id="mrs_01_1810__b4106653818388">hdfs dfs -mkdir /user/</strong><em id="mrs_01_1810__i364170301826">exampleUser</em></p>
<p id="mrs_01_1810__p2079044118221"><strong id="mrs_01_1810__b56956942183813">hdfs dfs -put -f /opt/client/Oozie/oozie-client-*/examples /user/</strong><em id="mrs_01_1810__i820788818226">exampleUser</em>/</p>
<div class="note" id="mrs_01_1810__note31403175101542"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_1810__ul53322783101827"><li id="mrs_01_1810__li27228022101827"><em id="mrs_01_1810__i114751419567">exampleUser</em> indicates the name of the user who submits tasks.</li><li id="mrs_01_1810__li64188474101827">If the user who submits the task and other files except <strong id="mrs_01_1810__b71037392022">job.properties</strong> are not changed, client installation directory <strong id="mrs_01_1810__b121032391526">Oozie/oozie-client-*/examples</strong> can be repeatedly used after being uploaded to HDFS.</li><li id="mrs_01_1810__li666901714394">Resolve the JAR file conflict between Spark and Yarn about Jetty.<p id="mrs_01_1810__p208701446103910"><a name="mrs_01_1810__li666901714394"></a><a name="li666901714394"></a><strong id="mrs_01_1810__b177751819194015">hdfs dfs -rm -f /user/oozie/share/lib/spark/jetty-all-9.2.22.v20170606.jar</strong></p>
</li><li id="mrs_01_1810__li44918696101827">In normal mode, if <span class="parmname" id="mrs_01_1810__parmname42752465417"><b>Permission denied</b></span> is displayed during the upload, run the following commands:<p id="mrs_01_1810__p46216406101833"><strong id="mrs_01_1810__b1033717101912">su - omm</strong></p>
<p id="mrs_01_1810__p51904221101834"><strong id="mrs_01_1810__b53202965101912">source /opt/client/bigdata_env</strong></p>
<p id="mrs_01_1810__p45366238101835"><strong id="mrs_01_1810__b8248641101912">hdfs dfs -chmod -R 777 /user/oozie</strong></p>
<p id="mrs_01_1810__p171444251800"><strong id="mrs_01_1810__b136741233502">exit</strong></p>
</li></ul>
</div></div>
</li></ol>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1807.html">Using Oozie</a></div>
</div>
</div>