Configuring Hive on HBase in Across Clusters with Mutual Trust Enabled
Scenario
Hive on HBase allows users to query and operate data stored in HBase through the Hive SQL APIs. It combines HBase's efficient storage and real-time read/write capabilities and Hive's SQL query capabilities, providing a flexible and efficient data processing mode.
Hive supports accessing and processing data stored in HBase within the same cluster, as well as accessing and processing HBase data across clusters with mutual trust. That is, in two clusters that have Kerberos authentication enabled and trust each other, you can use the Hive cluster to operate the HBase cluster by configuring the key HBase configuration items of the destination HBase cluster into the HiveServer of the source Hive cluster.
Prerequisites
The mutual trust relationship has been configured between the two security clusters with Kerberos authentication enabled.
Procedure for Configuring Hive on HBase Across Clusters
- Download the HBase configuration file and decompress it.
- Log in to FusionInsight Manager of the target HBase cluster, click Cluster and choose Services > HBase.
- Choose More > Download Client.
Figure 1 Downloading the HBase client
- Download the HBase configuration file and choose Configuration Files only for Select Client Type.
Figure 2 Downloading the HBase configuration file
- Log in to FusionInsight Manager of the source Hive cluster.
- Click Cluster, choose Services > Hive, click Configurations and then All Configurations. On the displayed page, add the following parameters to the hive-site.xml configuration file of the HiveServer role.
Search for the following parameters in the hbase-site.xml configuration file of the downloaded HBase client and add them to HiveServer:
- hbase.security.authentication
- hbase.security.authorization
- hbase.zookeeper.property.clientPort
- hbase.zookeeper.quorum (The domain name needs to be converted into an IP address.)
- hbase.regionserver.kerberos.principal
- hbase.master.kerberos.principal
Figure 3 Custom configurations of the HiveServer role
- After modifying the parameter settings, click Save, follow the on-screen instructions, and wait for the configuration to be saved successfully.
- After the Hive server configurations are updated, if Configure Status is Expired, restart the component for the configurations to take effect.
On the Hive dashboard page, choose More > Restart Service or Service Rolling Restart, enter the administrator password, and wait until the service restarts.
Components are unavailable during the restart, affecting upper-layer services in the cluster. To minimize the impact, perform this operation during off-peak hours or after confirming that the operation does not have adverse impact.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.