Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using YARN/ Submitting a Task Using the YARN Client
Updated on 2026-06-27 GMT+08:00

Submitting a Task Using the YARN Client

Scenarios

This section guides users to use a Yarn client in an O&M or service scenario.

Prerequisites

Service component users have been created by the MRS cluster administrator. In a cluster in security mode, machine-machine users need to download the keytab file. A human-machine user must change the password upon the first login. In a cluster in normal mode, you do not need to download the keytab file or change the password.

Using the YARN Client

  1. Install the client. If the client has been installed, skip this step.

    For example, if the installation directory is /opt/client. The client directory path used in the following steps is only an example. Replace it with your actual installation directory path.

    For details about how to download and install the cluster client, see Installing an MRS Cluster Client.

  2. Log in to the node where the client is installed as the client installation user.
  3. Run the following command to go to the client installation directory:

    cd /opt/client

  4. Run the following command to configure environment variables:

    source bigdata_env

  5. If Kerberos authentication is enabled for the cluster (in security mode), run the following command to authenticate the user. If Kerberos authentication is disabled for the cluster (in normal mode), user authentication is not required. In this case, skip this step.

    kinit Component service user

  6. Run the YARN command. For example, run the following command to view all applications in the YARN cluster:

    yarn application -list

    The command output is as follows:

    Total number of applications (application-types: [], states: [SUBMITTED, ACCEPTED, RUNNING] and tags: []):2
    Application-Id      Application-Name        Application-Type          User      Queue-User           Queue                   State             Final-State             Progress                        Tracking-URL
    application_1749532996066_0002        default-worker            yarn-service    hetuserver      hetuserver         default                 RUNNING               UNDEFINED                 100%                                 N/A
    application_1749532996066_0001   default-coordinator            yarn-service    hetuserver      hetuserver         default                 RUNNING               UNDEFINED                 100%                                 N/A

Helpful Links