Help Center/ MapReduce Service/ Getting Started/ Installing and Using the Cluster Client
Updated on 2022-09-14 GMT+08:00

Installing and Using the Cluster Client

This section describes how to quickly install and use clients of all services in an MRS 3.x cluster or later.

Clients can be installed on the nodes either in or outside the cluster. The following provides an example of how to install and use a client in a cluster.

If Flume has been installed in the cluster, the Flume client must be installed independently. For details about how to install the Flume client, see Installing the Flume Client.

You can get started by reading the following topics:

  1. Downloading a Client
  2. Installing a Client
  3. Using a Client

Downloading a Client

  1. Log in to FusionInsight Manager of the cluster by referring to Accessing FusionInsight Manager (MRS 3.x or Later).
  2. Download the software package of the cluster client to the target node.

    On the home page, click next to the cluster name and click Download Client to download the cluster client.

    Figure 1 Downloading a client

  3. On the Download Cluster Client page, enter the cluster client download information.

    Figure 2 Downloading the cluster client
    • Set Select Client Type to Complete Client.
    • Set Select Platform Type to the architecture of the node to install the client. x86_64 is used as an example.
    • Select Save to Path and enter the download path, for example, /opt/Bigdata/client. Ensure that user omm has the operation permission on the path.

      The cluster supports two types of clients: x86_64 and aarch64. The client type must match the architecture of the node for installing the client. Otherwise, client installation will fail.

  4. After the client software package is downloaded, log in to the active OMS node of the cluster as user root.

    By default, the client software package is downloaded to the active OMS node of the cluster. You can view the node marked with on the host page of FusionInsight Manager. If you need to install the client software package on another node in the cluster, run the following command to transfer the software package to the target node.

    In the cluster list on the MRS console, click the cluster name. On the Nodes page, click the name of the target node. On the ECS details page, you can remotely log in to this node.

    scp -p /opt/Bigdata/client/FusionInsight_Cluster_1_Services_Client.tar IP address of the node where the client is to be installed:/opt/Bigdata/client

Installing a Client

  1. Log in to the node where the client software package is installed as the client user (for example, user root) and run the following commands to decompress the software package:

    cd /opt/Bigdata/client

    tar -xvf FusionInsight_Cluster_1_Services_Client.tar

  2. Run the sha256sum command to verify the decompressed file.

    sha256sum -c FusionInsight_Cluster_1_Services_ClientConfig.tar.sha256

    FusionInsight_Cluster_1_Services_Client.tar: OK     

  3. Decompress the obtained installation file.

    tar -xvf FusionInsight_Cluster_1_Services_ClientConfig.tar

  4. Go to the directory where the installation package is stored and install the client.

    cd /opt/Bigdata/client/FusionInsight_Cluster_1_Services_ClientConfig

    Run the following command to install the client to a specified directory (an absolute path), for example, /opt/hadoopclient.

    ./install.sh /opt/hadoopclient

    ...
    The component client is installed successfully
    • If the /opt/hadoopclient directory has been used by existing service clients, you need to use another directory in this step when installing other service clients.
    • You must delete the client installation directory when uninstalling a client.
    • If you want to prevent other users from accessing this client, add parameter -o during the installation. That is, run the ./install.sh /opt/hadoopclient -o command to install the client.
    • If an HBase client is installed, it is recommended that the client installation directory contain only uppercase and lowercase letters, digits, and special characters (_-?.@+=) due to the limitation of the Ruby syntax used by HBase.
    • If the NTP server is to be installed in chrony mode, ensure that the parameter chrony is added during the installation, that is, run the ./install.sh /opt/hadoopclient -o chrony command to install the client.

Using a Client

  1. Log in to the node where the client is installed as the client installation user, and run the following command to switch to the client directory:

    cd /opt/hadoopclient

  2. Run the following command to load environment variables:

    source bigdata_env

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

    kinit MRS cluster user

    For example:

    kinit admin

  4. Run the client command of a component directly.

    For example:

    Run the following command to view files in the HDFS root directory:

    hdfs dfs -ls /

    Found 15 items
    drwxrwx--x   - hive       hive                0 2021-10-26 16:30 /apps
    drwxr-xr-x   - hdfs       hadoop              0 2021-10-18 20:54 /datasets
    drwxr-xr-x   - hdfs       hadoop              0 2021-10-18 20:54 /datastore
    drwxrwx---+  - flink      hadoop              0 2021-10-18 21:10 /flink
    drwxr-x---   - flume      hadoop              0 2021-10-18 20:54 /flume
    drwxrwx--x   - hbase      hadoop              0 2021-10-30 07:31 /hbase
    ...