• MapReduce Service

mrs
  1. Help Center
  2. MapReduce Service
  3. User Guide
  4. MRS Manager Operation Guide
  5. Tenant Management
  6. Creating a Tenant

Creating a Tenant

Scenario

You can create a tenant on MRS Manager to specify the resource usage.

Prerequisites

  • A tenant name has been planned. The name must not be the same as that of a role or Yarn queue that exists in the current cluster.
  • If a tenant requires storage resources, a storage directory has been planned in advance based on service requirements, and the planned directory does not exist under the HDFS directory.
  • The resources that can be allocated to the current tenant have been planned and the sum of the resource percentages of direct sub-tenants under the parent tenant at every level does not exceed 100%.

Procedure

  1. On MRS Manager, click Tenant.
  2. Click Create Tenant. On the displayed page, configure tenant attributes according to the following table.

    Table 1 Tenant parameters

    Parameter

    Description

    Name

    Specifies the name of the current tenant. The value consists of 3 to 20 characters, and can contain letters, digits, and underscores (_).

    Tenant Type

    The options include Leaf and Non-leaf. If Leaf is selected, the current tenant is a leaf tenant and no sub-tenant can be added. If Non-leaf is selected, sub-tenants can be added to the current tenant.

    Dynamic Resource

    Specifies the dynamic computing resources for the current tenant. The system automatically creates a task queue in Yarn and the queue is given the same name as the tenant. If dynamic resources are not Yarn resources, the system does not automatically create a task queue.

    Default Resource Pool Capacity (%)

    Specifies the percentage of the computing resources used by the current tenant in the default resource pool.

    Default Resource Pool Max. Capacity (%)

    Specifies the maximum percentage of the computing resources used by the current tenant in the default resource pool.

    Storage Resource

    Specifies the storage resources for the current tenant. The system automatically creates a file folder in the /tenant directory, which is given the same name as the tenant. When the tenant is created, the system automatically creates the /tenant directory under the root directory of HDFS. If storage resources are not HDFS, the system does not create a storage directory under the root directory of HDFS.

    Space Quota (MB)

    Specifies the quota for HDFS storage space used by the current tenant. The value of Space Quota ranges from 1 to 8796093022208 and the unit is MB. This parameter indicates the maximum HDFS storage space that can be used by the tenant, not the actual space used. If the value is greater than the size of the HDFS physical disk, the maximum space available is the full space of the HDFS physical disk.

    NOTE:

    To ensure data reliability, two more copies of a file are automatically generated when the file is stored in HDFS. That is, three copies of the same file are stored by default. The HDFS storage space indicates the total disk space occupied by all these copies. For example, if Space Quota is set to 500, the actual space for storing files is about 166 MB (500/3 = 166).

    Storage Path

    Specifies the tenant's HDFS storage directory. The system automatically creates a file folder in the /tenant directory, which is given the same name as the tenant. For example, the default HDFS storage directory for tenant ta1 is tenant/ta1. When the tenant is created, the system automatically creates the /tenant directory under the root directory of HDFS. The storage path is customizable.

    Service

    Specifies other service resources associated with the current tenant. HBase is supported. To configure this parameter, click Associate Services. In the dialog box that is displayed, set Service to HBase. If Association Mode is set to Exclusive, service resources are occupied exclusively. If share is selected, service resources are shared.

    Description

    Specifies the description of the current tenant.

  3. Click OK to save the settings.

    It takes a few minutes to save the settings. If the Tenant created successfully is displayed in the upper-right corner, the tenant is added successfully.

    NOTE:
    • Roles, computing resources, and storage resources are automatically created when tenants are created.
    • The new role has the rights on the computing and storage resources. The role and the rights are controlled by the system automatically and cannot be controlled manually under Manage Role.
    • If you want to use the tenant, create a system user and assign the Manager_tenant role and the role corresponding to the tenant to the user. For details, see Creating a User.

Related Tasks

Viewing an added tenant

  1. On MRS Manager, click Tenant.
  2. In the tenant list on the left, click the name of an added tenant.

    The Summary tab is displayed on the right by default.

  3. View Basic InformationResource Quota, and Statistics of the tenant.

    If HDFS is in the Stopped state, Available and Usage of Space in Resource Quota are unknown.