Yang, Tong 48706b7552 MRS COMP-LTS 320-lts.1 version
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2024-04-12 12:51:10 +00:00

19 lines
4.0 KiB
HTML

<a name="mrs_01_24738"></a><a name="mrs_01_24738"></a>
<h1 class="topictitle1">Load Balancing for Hive MetaStore Client Connection</h1>
<div id="body0000001533054338"><div class="section" id="mrs_01_24738__section1645318151702"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_24738__p2307171495819">The client connection of Hive MetaStore supports load balancing. That is, heavy load of a single MetaStore node during heavy service traffic can be avoided by connecting to the node with the least connections based on the connection number recorded in ZooKeeper. Enabling this function does not affect the original connection mode.</p>
<div class="note" id="mrs_01_24738__note1772111617525"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_24738__p14736161520">This section applies to MRS 3.2.0 or later.</p>
</div></div>
</div>
<div class="section" id="mrs_01_24738__section1047813502494"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_24738__ol1347855004917"><li id="mrs_01_24738__li44761050164918"><span>Log in to FusionInsight Manager, click <strong id="mrs_01_24738__b137715015504">Cluster</strong>, choose <strong id="mrs_01_24738__b77721601508">Services</strong> &gt; <strong id="mrs_01_24738__b677219055012">Hive</strong>, click <strong id="mrs_01_24738__b47731105505">Configurations</strong>, and then <strong id="mrs_01_24738__b107739055011">All Configurations</strong>.</span></li><li id="mrs_01_24738__li188971327124015"><span>Search for the <strong id="mrs_01_24738__b95018896534939">hive.metastore-ext.balance.connection.enable</strong> parameter and set its value to <strong id="mrs_01_24738__b61291070934939">true</strong>.</span></li><li id="mrs_01_24738__li109579476444"><span>Click <strong id="mrs_01_24738__b17861376933636">Save</strong>.</span></li><li id="mrs_01_24738__li16439746701"><span>Click <strong id="mrs_01_24738__b16727320233636">Instance</strong>, select all instances, choose <strong id="mrs_01_24738__b190939008733636">More</strong> &gt; <strong id="mrs_01_24738__b48189771633636">Restart Instance</strong>, enter the password, and click <strong id="mrs_01_24738__b89318039233636">OK</strong> to restart all Hive instances.</span></li><li id="mrs_01_24738__li94781150144912"><span>For other components that connect to MetaStore, add the <strong id="mrs_01_24738__b81528593103">hive.metastore-ext.balance.connection.enable</strong> parameter and set its value to <strong id="mrs_01_24738__b7573357115">true</strong>.</span><p><p id="mrs_01_24738__p1047795064917">The following example shows how to add this parameter if Spark2x needs to be connected to MetaStore:</p>
<ol type="a" id="mrs_01_24738__ol113767183152"><li id="mrs_01_24738__li4376418111516">Log in to FusionInsight Manager, click <strong id="mrs_01_24738__b143847250333636">Cluster</strong>, choose <strong id="mrs_01_24738__b209913376433636">Services</strong> &gt; <strong id="mrs_01_24738__b1772788833636">Spark2x</strong>, and click <strong id="mrs_01_24738__b133702045333636">Configurations</strong>.</li><li id="mrs_01_24738__li1637751814155">Click <strong id="mrs_01_24738__b11752932171315">Customization</strong>, add a custom parameter <strong id="mrs_01_24738__b1711531715145">hive.metastore-ext.balance.connection.enable</strong> to all <strong id="mrs_01_24738__b39771322191413">hive-site.xml</strong> parameter files, set its value to <strong id="mrs_01_24738__b18031460148">true</strong>, and click <strong id="mrs_01_24738__b1422113497146">Save</strong>.</li><li id="mrs_01_24738__li837721816152">Click <strong id="mrs_01_24738__b5544174371820">Instance</strong>, select all configuration-expired instances, choose <strong id="mrs_01_24738__b45451435184">More</strong> &gt; <strong id="mrs_01_24738__b12545643181811">Restart Instance</strong>, enter the password, and click <strong id="mrs_01_24738__b2545104331819">OK</strong> to restart them.</li></ol>
</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>