Hive Supports Isolation of Metastore instances Based on Components
Scenario
This function restricts components in a cluster to connect to specified Hive Metastore instances. By default, components can connect to all Metastore instances.
Currently, only HetuEngine, Hive, Loader, Metadata, Spark, and Flink can connect to Metastore in a cluster. The Metastore instances can be allocated in a unified manner.
- This function only limits the Metastore instances accessed by component servers. Metadata is not isolated.
- Currently, Flink tasks can only connect to Metastore instances through the client.
- 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.
- 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.
- You are advised to configure at least two Metastore instances for each component to ensure availability during isolation configuration.
Prerequisites
The Hive service has been installed in the cluster and is running properly.
Procedure
- Log in to FusionInsight Manager and choose Cluster > Services > Hive. On the displayed page, click the Configurations tab and then All Configurations, and search for the HIVE_METASTORE_URI parameter.
- Set the value of HIVE_METASTORE_URI_DEFAULT to the URI connection string of all Metastore instances.
- Connect a component to a specified Metastore instance. Copy the value in 2, modify the configuration items based on the component name, save the modification, and restart the component.
The following example shows how Spark connects only to two Metastore instances of Hive.
- Log in to FusionInsight Manager and choose Cluster > Services > Hive. On the displayed page, click the Configurations tab and then All Configurations, and search for the HIVE_METASTORE_URI parameter.
- Copy the default configuration of HIVE_METASTORE_URI_DEFAULT to the URI configuration item of Spark. If Spark needs to connect only to two Metastore instances, retain two nodes as required. Click Save.
- Choose Cluster > Services > Spark. Click Instance, select the instances whose configuration has expired, click More, and select Restart Instance. In the dialog box that is displayed, enter the password and click OK to restart the instances.
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