Switching the Scheduler

Scenario

The newly installed MRS cluster uses the Superior scheduler by default. If the cluster is upgraded from an earlier version, you can switch the YARN scheduler from the Capacity scheduler to the Superior scheduler with a few clicks.

Prerequisites

Impact on the System

Switching from the Capacity Scheduler to the Superior Scheduler

  1. Modify YARN service parameters and ensure that the YARN service status is normal.

    1. Log in to FusionInsight Manager as an administrator.
    2. Log in to FusionInsight Manager and choose Cluster > Services > Yarn. Click Configurations then All Configurations, search for yarn.resourcemanager.webapp.pagination.enable, and check whether the value is true.
      • If yes, go to 1.c.
      • If no, set the parameter to true and click Save to save the configuration. On the Dashboard tab page of YARN, choose More > Restart Service, verify the identity, and click OK. After the service is restarted, go to 1.c.
    3. Choose Cluster > Name of the desired cluster > Services, and check whether the YARN service status is normal.

  2. Log in to the active management node as user omm.
  3. Switch the scheduler.

    The following switching modes are available:

    0: converts the Capacity scheduler configurations into the Superior scheduler configurations and then switches the Capacity scheduler to the Superior scheduler.

    1: converts the Capacity scheduler configurations into the Superior scheduler configurations only.

    2: switches the Capacity scheduler to the Superior scheduler only.

    • Mode 0 is recommended if the cluster environment is simple and the number of tenants is less than 20.

      Run the following command:

      sh ${BIGDATA_HOME}/om-server/om/sbin/switchScheduler.sh -c Cluster ID -m 0

      You can choose Cluster, click the cluster name, and choose Cluster Properties on FusionInsight Manager to view the cluster ID.

      Start to convert Capacity scheduler to Superior Scheduler, clusterId=1
      Start to convert Capacity scheduler configurations to Superior. Please wait...
      Convert configurations successfully.
      Start to switch the Yarn scheduler to Superior. Please wait...
      Switch the Yarn scheduler to Superior successfully.
    • If the cluster environment or tenant information is complex and you need to retain the queue configurations of the Capacity scheduler on the Superior scheduler, it is recommended that you use mode 1 first to convert the Capacity scheduler configurations, check the converted configurations, and then use mode 2 to switch the Capacity scheduler to the Superior scheduler.
      1. Run the following command to convert the Capacity scheduler configurations into the Superior scheduler configurations:

        sh ${BIGDATA_HOME}/om-server/om/sbin/switchScheduler.sh -c Cluster ID -m 1

        Start to convert Capacity scheduler to Superior Scheduler, clusterId=1
        Start to convert Capacity scheduler configurations to Superior. Please wait...
        Convert configurations successfully.
      2. Run the following command to switch the Capacity scheduler to the Superior scheduler:

        sh ${BIGDATA_HOME}/om-server/om/sbin/switchScheduler.sh -c Cluster ID -m 2

        Start to convert Capacity scheduler to Superior Scheduler, clusterId=1
        Start to switch the Yarn scheduler to Superior. Please wait...
        Switch the Yarn scheduler to Superior successfully.
    • If you do not need to retain the queue configurations of the Capacity scheduler, use mode 2.
      1. Log in to FusionInsight Manager and delete all tenants except the default tenant.
      2. On FusionInsight Manager, delete all resource pools except the default resource pool.

        Run the following command to switch the Capacity scheduler to the Superior scheduler:

        sh ${BIGDATA_HOME}/om-server/om/sbin/switchScheduler.sh -c Cluster ID -m 2

        Start to convert Capacity scheduler to Superior Scheduler, clusterId=1
        Start to switch the Yarn scheduler to Superior. Please wait...
        Switch the Yarn scheduler to Superior successfully.

    You can query the scheduler switching logs on the active management node.

    • ${BIGDATA_LOG_HOME}/controller/aos/switch_scheduler.log
    • ${BIGDATA_LOG_HOME}/controller/aos/aos.log