Help Center/ MapReduce Service/ User Guide (Ankara Region)/ FAQs/ Kerberos Usage/ How Do I Access Hive in a Cluster with Kerberos Authentication Enabled?
Updated on 2024-11-29 GMT+08:00

How Do I Access Hive in a Cluster with Kerberos Authentication Enabled?

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

    source /opt/client/bigdata_env

  3. If Kerberos authentication is enabled for the current cluster, run the following command to authenticate the user:

    kinit MRS cluster user

    Example: kinit hiveuser

    The current user must have the permission to create Hive tables..

  4. Run the client command of the Hive component.

    beeline

  5. Run the Hive command in Beeline, for example:

    create table test_obs(a int, b string) row format delimited fields terminated by "," stored as textfile location "obs://test_obs";

  6. Press Ctrl+C to exit the Hive Beeline.