Updated on 2023-04-28 GMT+08:00

Using the HetuEngine Client

Scenario

If a compute instance is not created or started, you can log in to the HetuEngine client to create or start the compute instance. This section describes how to manage a compute instance on the client in the O&M or service scenario.

Prerequisites

  • The cluster client has been installed in a directory, for example, /opt/client.
  • You have created a common HetuEngine user, for example, hetu_test who has the permissions of the Hive (with Ranger disabled), hetuuser, and default queues.

    For details about how to create a user, see Creating a HetuEngine User.

Procedure

  1. Log in to the node where the HetuEngine client resides as the user who installs the client, and switch to the client installation directory.

    cd /opt/client

  2. Run the following command to configure environment variables:

    source bigdata_env

  3. Log in to the HetuEngine client based on the cluster authentication mode.

    • In security mode, run the following command to complete user authentication and log in to the HetuEngine client:

      kinit hetu_test

      hetu-cli --catalog hive --tenant default --schema default

    • In normal mode, run the following command to log in to the HetuEngine client:

      hetu-cli --catalog hive --tenant default --schema default --user hetu_test

      hetu_test is a service user who has at least the tenant role specified by --tenant and cannot be an OS user.

    Parameter description:

    • --catalog: (Optional) Specifies the name of the specified data source.
    • --tenant: (Optional) Specifies the tenant resource queue started by the cluster. Do not specify it as the default queue of a tenant. When this parameter is used, the service user must have the role permission of the tenant.
    • --schema: (Optional) Specifies the name of the schema of the data source to be accessed.
    • --user: (Mandatory in normal mode) Specifies the name of the user who logs in to the client to execute services. The user must have at least the role of the queue specified by --tenant.
    • It takes about 120 seconds for your first login to the client because the HetuEngine cluster needs to be started in the background.
    • The client supports SQL syntax and is compatible with the SQL syntax of the open-source openLooKeng 1.2.0.
    • You can run the hetu-cli --help command to view other parameters.