doc-exports/docs/mrs/umn/mrs_03_1158.html
Yang, Tong 3b1f73dece MRS UMN 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-12-13 12:03:34 +00:00

3.2 KiB

How Do I Connect to Spark Beeline from MRS?

  1. Log in to the master node in the cluster as user root.
  2. Run the following command to configure environment variables:

    source Client installation directory/bigdata_env

  3. If Kerberos authentication is enabled for the cluster, authenticate the user. If Kerberos authentication is disabled, skip this step.

    Command: kinit MRS cluster user

    Example:

    • If the user is a machine-machine user, run kinit -kt user.keytab sparkuser.
    • If the user is a human-machine user, run kinit sparkuser.
  4. Run the following command to connect to Spark Beeline:

    spark-beeline

  5. 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/';

  6. Query all tables.

    show tables;

    If the table test is displayed in the command output, OBS is successfully accessed.

    Figure 1 Returned table name
  7. Press Ctrl+C to exit the Spark Beeline.