Forbidding Location Specification When Hive Internal Tables Are Created
The hive.internaltable.notallowlocation parameter can be used to prevent Location from being specified during Hive internal table creation. That is, after the table is created successfully, the location path of the table is created in the current default warehouse directory and cannot be specified in other directories. If Location is specified when creating an internal table, the creation fails.
After this function is enabled, the location keyword cannot be specified during the creation of a Hive internal table. The table creation statement is restricted. If a table that has been created in the database is not stored in the default directory /warehouse, the location keyword can still be specified when the database creation, table script migration, or metadata recreation operation is performed by disabling this function temporarily.
Procedure
- Log in to FusionInsight Manager. Click Cluster > Services > Hive, click Configurations > All Configurations.
- Choose HiveServer(Role) > Customization, add a customized parameter to the hive-site.xml parameter file, set Name to hive.internaltable.notallowlocation, and set Value to true.
- Click Save to save the configuration. Click Instance, select all Hive instances, choose More > Restart Instance, enter the password of the current user, and click OK to restart all Hive instances.
- Determine whether to enable this function on the Spark/Spark2x client.
- If yes, download and install the Spark/Spark2x client again.
- If no, no further action is required.
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