forked from docs/doc-exports
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>
24 lines
5.6 KiB
HTML
24 lines
5.6 KiB
HTML
<a name="mrs_01_24467"></a><a name="mrs_01_24467"></a>
|
|
|
|
<h1 class="topictitle1">Hive Supports Isolation of Metastore instances Based on Components</h1>
|
|
<div id="body0000001583501817"><div class="section" id="mrs_01_24467__section1164851310303"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_24467__p8363172443015">This function restricts components in a cluster to connect to specified Hive Metastore instances. By default, components can connect to all Metastore instances. This function applies only to clusters whose version is MRS 3.<span id="mrs_01_24467__ph146288596336">2.0</span> or later.</p>
|
|
<p id="mrs_01_24467__p0363624133013">Currently, only HetuEngine, Hive, Loader, Metadata, Spark2x and Flink can connect to Metastore in a cluster. The Metastore instances can be allocated in a unified manner.</p>
|
|
<div class="note" id="mrs_01_24467__note17239183493814"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_24467__ul586617493387"><li id="mrs_01_24467__li9866154914389">This function only limits the Metastore instances accessed by component servers. Metadata is not isolated.</li><li id="mrs_01_24467__li7866194933817">Currently, Flink tasks can only connect to Metastore instances through the client.</li><li id="mrs_01_24467__li1586618496383">When spark-sql is used to execute tasks, the client is directly connected to Metastore. The client needs to be updated for the isolation to take effect.</li><li id="mrs_01_24467__li13866949163812">This function supports only isolation in the same cluster. If HetuEngine is deployed in different clusters, unified isolation configuration is not supported. You need to modify the HetuEngine configuration to connect to the specified Metastore instance.</li><li id="mrs_01_24467__li1997141417181">You are advised to configure at least two Metastore instances for each component to ensure availability during isolation configuration.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="mrs_01_24467__section105469619492"><h4 class="sectiontitle">Prerequisites</h4><p id="mrs_01_24467__p29751321154916">The Hive service has been installed in the cluster and is running properly.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_24467__section20110832134911"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_24467__ol17193652174919"><li id="mrs_01_24467__li1819345234916"><span>Log in to FusionInsight Manager and choose <strong id="mrs_01_24467__b163244694244145">Cluster</strong> > <strong id="mrs_01_24467__b83905601044145">Services</strong> > <strong id="mrs_01_24467__b145850499944145">Hive</strong>. On the displayed page, click the <strong id="mrs_01_24467__b176026333344145">Configurations</strong> tab and then <strong id="mrs_01_24467__b162533676744145">All Configurations</strong>, and search for the <strong id="mrs_01_24467__b95151239267">HIVE_METASTORE_URI</strong> parameter.</span></li><li id="mrs_01_24467__li31543502585"><a name="mrs_01_24467__li31543502585"></a><a name="li31543502585"></a><span>Set the value of <strong id="mrs_01_24467__b1781846868">HIVE_METASTORE_URI_DEFAULT</strong> to the URI connection string of all Metastore instances.</span><p><p id="mrs_01_24467__p172853175715"><span><img id="mrs_01_24467__image15286365712" src="en-us_image_0000001533544798.png"></span></p>
|
|
</p></li><li id="mrs_01_24467__li153752121221"><span>Connect a component to a specified Metastore instance. Copy the value in <a href="#mrs_01_24467__li31543502585">2</a>, modify the configuration items based on the component name, save the modification, and restart the component.</span><p><div class="p" id="mrs_01_24467__p19441121321014">The following example shows how Spark2x connects to only two Metastore instances of Hive.<ol type="a" id="mrs_01_24467__ol1435719517105"><li id="mrs_01_24467__li54849460106">Log in to FusionInsight Manager and choose <strong id="mrs_01_24467__b1880114236279">Cluster</strong> > <strong id="mrs_01_24467__b280132316271">Services</strong> > <strong id="mrs_01_24467__b18801182311278">Hive</strong>. On the displayed page, click the <strong id="mrs_01_24467__b080119239274">Configurations</strong> tab and then <strong id="mrs_01_24467__b18011823152720">All Configurations</strong>, and search for the <strong id="mrs_01_24467__b178026234276">HIVE_METASTORE_URI</strong> parameter.</li><li id="mrs_01_24467__li469613274119">Copy the default configuration of <strong id="mrs_01_24467__b15981164432711">HIVE_METASTORE_URI_DEFAULT</strong> to the URI configuration item of Spark2x. If Spark2x needs to connect to only two Metastore instances, retain two nodes as required. Click <strong id="mrs_01_24467__b2067322714296">Save</strong>.<p id="mrs_01_24467__p2582229155710"><span><img id="mrs_01_24467__image1458282965711" src="en-us_image_0000001583504773.png"></span></p>
|
|
</li><li id="mrs_01_24467__li1845881018517">Choose <strong id="mrs_01_24467__b16366101173019">Cluster</strong> > <strong id="mrs_01_24467__b18161321153019">Services</strong> > <strong id="mrs_01_24467__b20156143211304">Spark2x</strong>. On the displayed page, click the <strong id="mrs_01_24467__b20916135573013">Instance</strong> tab, select the instances whose configuration has expired, and choose <strong id="mrs_01_24467__b20592111653113">More</strong> > <strong id="mrs_01_24467__b178542123110">Restart Instance</strong>. In the dialog box that is displayed, enter the password and click <strong id="mrs_01_24467__b27891824203215">OK</strong> to restart the instances.</li></ol>
|
|
</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>
|
|
|