Help Center/
MapReduce Service/
Developer Guide (Normal_Earlier Than 3.x)/
Spark Application Development/
FAQs/
How Do I Connect to Hive and HDFS of an MRS Cluster when the Spark Program Is Running on a Local Host?
Updated on 2022-09-14 GMT+08:00
How Do I Connect to Hive and HDFS of an MRS Cluster when the Spark Program Is Running on a Local Host?
Question
How do I connect to Hive and HDFS of an MRS cluster when the Spark program is running on a local host?
Answer
- Apply for and bind an elastic public IP address for each master node.
- Configure the mapping between the cluster IP addresses and host names on the local Windows host. Log in to the cluster background, run the cat /etc/hosts command, and copy the mapping between IP addresses and host names in the hosts file to C:\Windows\System32\drivers\etc\hosts. Host names are subject to the query result.
192.168.0.90 node-master1BedB.089d8c43-12d5-410c-b980-c2728a305be3.com 192.168.0.129 node-ana-corezLaR.089d8c43-12d5-410c-b980-c2728a305be3.com
- Log in to the background of any master node in the MRS cluster as user root and run the cat /etc/hosts command to obtain the mapping between IP addresses and host names in the hosts file.
- In C:\Windows\System32\drivers\etc\hosts of the local Windows host, configure the mapping obtained in 3 and change the IP addresses of all master nodes to the EIPs bound to the nodes.
- Save /opt/client/Hive/Beeline/conf/core-site.xml, /opt/client/Hive/config/hiveclient.properties, and /opt/client/Hive/config/hive-site.xml of the MRS cluster to the conf directory of the project.
- Log in to MRS Manager and choose System > Manage User.
- Select a user who has Hive privileges, choose More > Download Authentication Credential in the Operation column, save the file, and decompress the package to obtain the user.keytab and krb5.conf files.
- Change the IP address of the master node in the krb5.conf file to the EIP bound to the node. Save the user.keytab and krb5.conf files to the conf directory of the project.
- Modify the security group rules of the MRS cluster and change the IP address policy of the Windows where IDEA resides to allow all IP addresses.
Parent topic: FAQs
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.