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

24 lines
6.4 KiB
HTML

<a name="mrs_01_0974"></a><a name="mrs_01_0974"></a>
<h1 class="topictitle1">HiveServer Lease Isolation</h1>
<div id="body1590395285098"><div class="section" id="mrs_01_0974__section18166125272016"><h4 class="sectiontitle">Scenario</h4><ul id="mrs_01_0974__ul17166185212015"><li id="mrs_01_0974__li1416614521205">This function applies to Hive.</li><li id="mrs_01_0974__li1616685210202">This function can be enabled to specify specific users to access HiveServer services on specific nodes, achieving HiveServer resource isolation.</li></ul>
<div class="note" id="mrs_01_0974__note835285022717"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_0974__p12363135052715">This section applies to MRS 3.<em id="mrs_01_0974__i39985135915">x</em> or later clusters.</p>
</div></div>
</div>
<div class="section" id="mrs_01_0974__section3919113211206"><h4 class="sectiontitle">Procedure</h4><p id="mrs_01_0974__p616665219203">This section describes how to set lease isolation for user <strong id="mrs_01_0974__b109628357575">hiveuser</strong> for existing HiveServer instances.</p>
<ol id="mrs_01_0974__ol3166135282019"><li id="mrs_01_0974__li1816665232020"><span>Log in to FusionInsight Manager. For details, see <a href="mrs_01_2124.html">Accessing FusionInsight Manager (MRS 3.x or Later)</a>.</span></li><li id="mrs_01_0974__li1669517370136"><span>Choose <strong id="mrs_01_0974__b1647098552425">Cluster </strong>&gt; <em id="mrs_01_0974__i136612346352425">Name of the desired cluster</em> &gt; <strong id="mrs_01_0974__b55722477652425">Services</strong> &gt; <strong id="mrs_01_0974__b27354208952425">Hive </strong>&gt; <strong id="mrs_01_0974__b125741237052425">HiveServer</strong>.</span></li><li id="mrs_01_0974__li3166165222010"><span>In the HiveServer list, select the HiveServer for which lease isolation is configured and choose <strong id="mrs_01_0974__b132789748752425">HiveServer </strong>&gt; <strong id="mrs_01_0974__b30793249152425">Instance Configurations</strong> &gt; <strong id="mrs_01_0974__b34541438052425">All Configurations</strong>.</span></li><li id="mrs_01_0974__li21663526200"><a name="mrs_01_0974__li21663526200"></a><a name="li21663526200"></a><span>In the upper right corner of the <strong id="mrs_01_0974__b594212591500">All Configurations</strong> page, search for <strong id="mrs_01_0974__b7126666512">hive.server2.zookeeper.namespace</strong> and specify its value, for example, <strong id="mrs_01_0974__b20705122316518">hiveserver2_zk</strong>.</span></li><li id="mrs_01_0974__li11661752142010"><span>Click <strong id="mrs_01_0974__b24686998552425">Save</strong>. In the dialog box that is displayed, click <strong id="mrs_01_0974__b60332105752425">OK</strong>.</span></li><li id="mrs_01_0974__li12166155218202"><span>Choose <strong id="mrs_01_0974__b1571125013210">Cluster</strong> &gt; <em id="mrs_01_0974__i3725195319216">Name of the desired cluster</em> &gt; <strong id="mrs_01_0974__b12937115517217">Services</strong> &gt; <strong id="mrs_01_0974__b133532589215">Hive</strong>, choose <strong id="mrs_01_0974__b146251951137">More</strong> &gt; <strong id="mrs_01_0974__b1376918715312">Restart Service</strong>, and enter the password to restart the service.</span></li><li id="mrs_01_0974__li161667527201"><span>Run the <strong id="mrs_01_0974__b196985726552425">beeline -u</strong> command to log in to the client and run the following command:</span><p><p id="mrs_01_0974__p916685219206"><strong id="mrs_01_0974__b116695211202">beeline -u "jdbc:hive2://</strong><em id="mrs_01_0974__i1416614523207">10.5.159.13</em><strong id="mrs_01_0974__b19167125215209">:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=</strong><em id="mrs_01_0974__i116719527206">hiveserver2</em><em id="mrs_01_0974__i171675528204">_zk</em><strong id="mrs_01_0974__b142257281209">;sasl.qop=auth-conf;auth=KERBEROS;principal=hive/hadoop.</strong><em id="mrs_01_0974__i416715211207">&lt;System domain name</em><strong id="mrs_01_0974__b791618342019">&gt;@</strong><em id="mrs_01_0974__i1016717528207">&lt;System domain name&gt;</em><strong id="mrs_01_0974__b018718471309">"</strong></p>
<p id="mrs_01_0974__p01671952162014">In the command, <strong id="mrs_01_0974__b1450515125716">10.5.159.13</strong> is replaced with the IP address of any ZooKeeper instance, which can be viewed through <strong id="mrs_01_0974__b150606847352425">Cluster</strong> &gt; <em id="mrs_01_0974__i147445170652425">Name of the desired cluster</em> &gt; <strong id="mrs_01_0974__b3127090852425">Services</strong> &gt; <strong id="mrs_01_0974__b1089210952425">ZooKeeper</strong> &gt; <strong id="mrs_01_0974__b214137847952425">Instance</strong>.</p>
<p id="mrs_01_0974__p2167155210202"><strong id="mrs_01_0974__b153719301816">hiveserver2_zk</strong> following <strong id="mrs_01_0974__b2037430417">zooKeeperNamespace=</strong> is set to the value of <strong id="mrs_01_0974__b103713013116">hive.server2.zookeeper.namespace</strong> in <a href="#mrs_01_0974__li21663526200">4</a>.</p>
<div class="p" id="mrs_01_0974__p716713526203">As a result, only the HiveServer whose lease isolation is configured can be logged in.<div class="note" id="mrs_01_0974__note12167125212011"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_0974__ul8167952102010"><li id="mrs_01_0974__li1916717523203">After this function is enabled, you must run the preceding command during login to access the HiveServer for which lease isolation is configured. If you run the <strong id="mrs_01_0974__b216716527209">beeline</strong> command to log in to the client, only the HiveServer that is not isolated by the lease is accessed.</li><li id="mrs_01_0974__li19167452122014">You can log in to FusionInsight Manager, choose <strong id="mrs_01_0974__b46005230052425">System</strong> &gt; <strong id="mrs_01_0974__b100843564852425">Permission</strong> &gt; <strong id="mrs_01_0974__b152623506452425">Domain and Mutual Trust</strong>, and view the value of <strong id="mrs_01_0974__b84366724652425">Local Domain</strong>, which is the current system domain name. <strong id="mrs_01_0974__b101954351852425">hive/hadoop.</strong>&lt;<em id="mrs_01_0974__i169633621352425">system domain name</em>&gt; is the username. All letters in the system domain name contained in the username are lowercase letters.</li></ul>
</div></div>
</div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_0581.html">Using Hive</a></div>
</div>
</div>