Creating Databases and Creating Tables in the Default Database Only as the Hive Administrator
Scenario
This function is applicable to Hive and Spark2x/Spark.
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.
![](https://support.huaweicloud.com/intl/en-us/cmpntguide-lts-mrs/public_sys-resources/note_3.0-en-us.png)
- 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.
- 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.
Procedure
- Log in to FusionInsight Manager. For details, see Accessing FusionInsight Manager. Click Cluster, choose Services > Hive, click Configurations, and then All Configurations.
- Choose HiveServer(Role) > Customization, add a customized parameter to the hive-site.xml parameter file, set Name to hive.allow.only.admin.create, and set Value to true. Restart all Hive instances after the modification.
- Determine whether to enable this function on the Spark/Spark2x client.
- If yes, go to 4.
- If no, no further action is required.
- Choose SparkResource2x > Customization, add a customized parameter to the hive-site.xml parameter file, set Name to hive.allow.only.admin.create, and set Value to true. Then, choose JDBCServer2x > Customization and repeat the preceding operations to add the customized parameter. Restart all Spark2x instances after the modification.
- Download and install the Spark/Spark2x client again.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot