Updated on 2024-04-11 GMT+08:00

Managing Services

You can perform the following operations on MRS:

  • Add or delete services. This is available only for custom clusters of MRS 3.1.2 and later versions.
  • Start the service in the Stopped, Stop Failed, or Failed to Start state to use the service.
  • Stop the services or stop abnormal services.
  • Restart abnormal services or configure expired services to restore or enable the services.

Prerequisites

  • You have configured permissions for the user group to which the IAM users belong.

    Adding or deleting a service in a cluster is a high-risk operation. Bind the MRS FullAccess, MRS Administrator, Server Administrator, Tenant Guest, MRS Administrator, or Tenant Administrator policy to the user group before you perform this operation. For details about the permissions, see Synchronizing IAM Users to MRS.

  • You have synchronized IAM users. (On the Dashboard tab page, click Synchronize next to IAM User Sync to synchronize IAM users.)
    Figure 1 Synchronizing IAM users

Impact on the System

  • The stateful component cannot be added to the task node group.

Adding a Service

Services can be added and deleted in MRS 3.1.2-LTS.3 or later.

  1. On the cluster details page, Choose Components and click Add Service.
  2. In the service list, select the services to be added and click Next.

    • When you add a service, the underlying services on which the service depends are automatically selected. You can add multiple services at the same time.
    • You can add a service only on a node in normal state.
    • If you add Hadoop to a cluster with no Hadoop before, you need to refresh the cluster details page on the MRS console and synchronize IAM users so that jobs can be successfully submitted.
    • A single component of the Hadoop service cannot be added to the cluster. Only the Hadoop service can be added. The Hadoop service includes MapReduce, Yarn, and HDFS.
    • After the Spark2x component is added, if you need to operate SparkSQL on the Hue web UI, restart the Hue service first.

  3. On the Topology Adjustment page, select the nodes where the service is to be deployed. For details about the deployment scheme, see Table 3.
  4. Click OK. After the service is added, you can view the added service on the Components page.

    The services added on the console are automatically synchronized to Manager.

Deleting a Service

Services can be added and deleted in MRS 3.1.2-LTS.3 or later.

  1. On the cluster details page, click Components.
  2. Locate the row that contains the target service and click Delete.

    • If the service to be deleted has upper-layer dependencies, the service cannot be deleted. Only one service can be deleted at a time.
    • You can delete installed services except Hadoop (HDFS, Yarn, and MapReduce), Ranger, DBService, KrbServer, LdapServer, and meta services.

  3. Enter DELETE in the displayed Delete Service dialog box and click OK to confirm the deletion.

    • The services deleted on the console are automatically synchronized to Manager.
    • Before deleting a service, back up the service data to prevent data loss.

Starting, Stopping, and Restarting a Service

  1. On the MRS cluster details page, click Components.
  2. Locate the row that contains the target service, Start, Stop, and Restart to start, stop, or restart the service.

    Services are interrelated. If a service is started, stopped, and restarted, services dependent on it will be affected.

    The services will be affected in the following ways:

    • If a service is to be started, the lower-layer services dependent on it must be started first.
    • If a service is stopped, the upper-layer services dependent on it are unavailable.
    • If a service is restarted, the running upper-layer services dependent on it must be restarted.