Help Center/
MapReduce Service/
User Guide (Ankara Region)/
FAQs/
Kerberos Usage/
How Do I Access Spark in a Cluster with Kerberos Authentication Enabled?
Updated on 2024-11-29 GMT+08:00
How Do I Access Spark in a Cluster with Kerberos Authentication Enabled?
- Log in to the master node in the cluster as user root.
- Run the following command to configure environment variables:
- If the Kerberos authentication is enabled for the current cluster, run the following command to authenticate the user.
Example:
If the development user is a machine-machine user, run kinit -kt user.keytab sparkuser.
If the development user is a human-machine user, run kinit sparkuser.
- Run the following command to connect to Spark Beeline:
- Run commands on Spark Beeline. For example, create the table test in the obs://mrs-word001/table/ directory.
create table test(id int) location 'obs://mrs-word001/table/';
- Run the following command to query all tables. If table test is displayed in the command output, OBS access is successful.
show tables;Figure 1 Returned table name
- Press Ctrl+C to exit Spark Beeline.
Parent topic: Kerberos Usage
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot