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>
22 lines
6.2 KiB
HTML
22 lines
6.2 KiB
HTML
<a name="mrs_01_0969"></a><a name="mrs_01_0969"></a>
|
|
|
|
<h1 class="topictitle1">Creating Databases and Creating Tables in the Default Database Only as the Hive Administrator</h1>
|
|
<div id="body1590395285090"><div class="section" id="mrs_01_0969__section1861622744312"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_0969__p1960173420419">This function is applicable to Hive and Spark2x for MRS 3.<em id="mrs_01_0969__i158141451205114">x</em> or later, or Hive and Spark for versions earlier than MRS 3.x.</p>
|
|
<p id="mrs_01_0969__p465992794310">After this function is enabled, only the Hive administrator can create databases and tables in the default database. Other users can use the databases only after being authorized by the Hive administrator.</p>
|
|
<div class="note" id="mrs_01_0969__note1421164451216"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_0969__ul1939114731215"><li id="mrs_01_0969__li1339114717125">After this function is enabled, common users are not allowed to create a database or create a table in the default database. Based on the actual application scenario, determine whether to enable this function.</li><li id="mrs_01_0969__li1339164711215">Permissions of common users are restricted. In the scenario where common users have been used to perform operations, such as database creation, table script migration, and metadata recreation in an earlier version of database, the users can perform such operations on the database in the condition that this function is disabled temporarily after the database is migrated or after the cluster is upgraded.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="mrs_01_0969__section20620527124312"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_0969__ol181811550174911"><li id="mrs_01_0969__li13806122116487"><span>The Hive service configuration page is displayed.</span><p><ul id="mrs_01_0969__ul1692910323486"><li id="mrs_01_0969__li792916322486">For versions earlier than MRS 1.9.2, log in to MRS Manager, choose <strong id="mrs_01_0969__b68074274211">Services</strong> > <strong id="mrs_01_0969__b1480174210423">Hive</strong> > <strong id="mrs_01_0969__b1181154294217">Service Configuration</strong>, and select <strong id="mrs_01_0969__b1181542124219">All</strong> from the <strong id="mrs_01_0969__b1481174224219">Basic</strong> drop-down list.</li><li id="mrs_01_0969__li979413816488">For MRS 1.9.2 or later, click the cluster name on the MRS console, choose <strong id="mrs_01_0969__b1688581069">Components</strong> > <strong id="mrs_01_0969__b188856115619">Hive</strong> > <strong id="mrs_01_0969__b1886711864">Service Configuration</strong>, and select <strong id="mrs_01_0969__b88861811265">All</strong> from the <strong id="mrs_01_0969__b6887515616">Basic</strong> drop-down list.<div class="note" id="mrs_01_0969__note73070488542"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_0969__p660617634114">If the <strong id="mrs_01_0969__b724192413598">Components</strong> tab is unavailable, complete IAM user synchronization first. (On the <strong id="mrs_01_0969__b18241724195914">Dashboard</strong> page, click <strong id="mrs_01_0969__b2240248599">Synchronize</strong> on the right side of <span class="parmname" id="mrs_01_0969__parmname2241624145914"><b>IAM User Sync</b></span> to synchronize IAM users.)</p>
|
|
</div></div>
|
|
</li><li id="mrs_01_0969__li1675864017574">For MRS 3.<em id="mrs_01_0969__i19661175865">x</em> or later, log in to FusionInsight Manager. For details, see <a href="mrs_01_2124.html">Accessing FusionInsight Manager (MRS 3.x or Later)</a>. And choose <strong id="mrs_01_0969__b203573713618">Cluster</strong> > <em id="mrs_01_0969__i93589719613">Name of the desired cluster</em> > <strong id="mrs_01_0969__b6359177961">Services</strong> > <strong id="mrs_01_0969__b33591271269">Hive</strong> > <strong id="mrs_01_0969__b17360147366">Configurations</strong> > <strong id="mrs_01_0969__b836018720610">All Configurations</strong>.</li></ul>
|
|
</p></li><li id="mrs_01_0969__li051003218413"><span>Choose <strong id="mrs_01_0969__b522112394482">HiveServer(Role)</strong> > <strong id="mrs_01_0969__b9226839184811">Customization</strong>, add a customized parameter to the <strong id="mrs_01_0969__b1122783964816">hive-site.xml</strong> parameter file, set <strong id="mrs_01_0969__b8227203913486">Name</strong> to <strong id="mrs_01_0969__b622783934819">hive.allow.only.admin.create</strong>, and set <strong id="mrs_01_0969__b132281039114814">Value</strong> to <strong id="mrs_01_0969__b152284395488">true</strong>. Restart all Hive instances after the modification.</span></li><li id="mrs_01_0969__li39661191595"><span>Determine whether to enable this function on the Spark/Spark2x client.</span><p><ul id="mrs_01_0969__ul5967798914"><li id="mrs_01_0969__li129671997912">If yes, go to <a href="#mrs_01_0969__li475373212497">4</a>.</li><li id="mrs_01_0969__li596799993">If no, no further action is required.</li></ul>
|
|
</p></li></ol><ol start="4" id="mrs_01_0969__ol16520153115499"><li id="mrs_01_0969__li475373212497"><a name="mrs_01_0969__li475373212497"></a><a name="li475373212497"></a><span>Choose <strong id="mrs_01_0969__b456613451819">SparkResource2x</strong> > <strong id="mrs_01_0969__b1256734520117">Customization</strong>, add a customized parameter to the <strong id="mrs_01_0969__b85671445112">hive-site.xml</strong> parameter file, set <strong id="mrs_01_0969__b25671645812">Name</strong> to <strong id="mrs_01_0969__b2056774520118">hive.allow.only.admin.create</strong>, and set <strong id="mrs_01_0969__b85671345517">Value</strong> to <strong id="mrs_01_0969__b15672451211">true</strong>. Then, choose <strong id="mrs_01_0969__b191505434218">JDBCServer2x</strong> > <strong id="mrs_01_0969__b2757141618312">Customization</strong> and repeat the preceding operations to add the customized parameter. Restart all Spark2x instances after the modification.</span></li><li id="mrs_01_0969__li1851452185514"><span>Download and install the Spark/Spark2x client again.</span></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>
|
|
|