Updated on 2025-03-17 GMT+08:00
How Do I Connect to Spark Beeline from MRS?
- Log in to the master node in the cluster as user root.
- Run the following command to configure environment variables:
- If Kerberos authentication is enabled for the cluster, authenticate the user. If Kerberos authentication is disabled, skip this step.
Run the kinit MRS cluster user command.
Examples:
- For a machine-machine user, run the kinit -kt user.keytab sparkuser command.
- For a human-machine user, run the kinit sparkuser command.
- 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/';
- Query all tables.
If the table test is displayed in the command output, OBS is successfully accessed.
Figure 1 Returned table name
- Press Ctrl+C to exit the Spark Beeline.
Parent topic: Client Usage
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.