Yang, Tong 3f5759eed2 MRS comp-lts 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>
2023-01-19 17:08:45 +00:00

19 lines
4.0 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="body8662426"><div class="section" id="mrs_01_0969__en-us_topic_0000001219029137_section1861622744312"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_0969__en-us_topic_0000001219029137_p1960173420419">This function is applicable to Hive and Spark2x.</p>
<p id="mrs_01_0969__en-us_topic_0000001219029137_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__en-us_topic_0000001219029137_note1421164451216"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_0969__en-us_topic_0000001219029137_ul1939114731215"><li id="mrs_01_0969__en-us_topic_0000001219029137_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__en-us_topic_0000001219029137_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__en-us_topic_0000001219029137_section20620527124312"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_0969__en-us_topic_0000001219029137_ol181811550174911"><li id="mrs_01_0969__en-us_topic_0000001219029137_li874802051810"><span>Log in to FusionInsight Manager. For details, see <a href="mrs_01_2124.html">Accessing FusionInsight Manager</a>. Choose <strong id="mrs_01_0969__en-us_topic_0000001219029137_b337314245514">Cluster</strong> &gt; <strong id="mrs_01_0969__en-us_topic_0000001219029137_b13697163013481">Services</strong> &gt; <strong id="mrs_01_0969__en-us_topic_0000001219029137_b7698930134819">Hive</strong> &gt; <strong id="mrs_01_0969__en-us_topic_0000001219029137_b19698203019484">Configurations</strong> &gt; <strong id="mrs_01_0969__en-us_topic_0000001219029137_b969816307483">All Configurations</strong>.</span></li><li id="mrs_01_0969__en-us_topic_0000001219029137_li051003218413"><span>Choose <strong id="mrs_01_0969__en-us_topic_0000001219029137_b522112394482">HiveServer(Role)</strong> &gt; <strong id="mrs_01_0969__en-us_topic_0000001219029137_b9226839184811">Customization</strong>, add a customized parameter to the <strong id="mrs_01_0969__en-us_topic_0000001219029137_b1122783964816">hive-site.xml</strong> parameter file, set <strong id="mrs_01_0969__en-us_topic_0000001219029137_b8227203913486">Name</strong> to <strong id="mrs_01_0969__en-us_topic_0000001219029137_b622783934819">hive.allow.only.admin.create</strong>, and set <strong id="mrs_01_0969__en-us_topic_0000001219029137_b132281039114814">Value</strong> to <strong id="mrs_01_0969__en-us_topic_0000001219029137_b152284395488">true</strong>. Restart all Hive instances after the modification.</span></li><li id="mrs_01_0969__en-us_topic_0000001219029137_li39661191595"><span>Determine whether to enable this function on the Spark2x client.</span><p><ul id="mrs_01_0969__en-us_topic_0000001219029137_ul5967798914"><li id="mrs_01_0969__en-us_topic_0000001219029137_li129671997912">If yes, download and install the Spark2x client again.</li><li id="mrs_01_0969__en-us_topic_0000001219029137_li596799993">If no, no further action is required.</li></ul>
</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>