Creating an MRS Tenant
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 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/sub-tenants under the parent tenant at every level does not exceed 100%.
- The IAM users have been synchronized in advance. You can do this by clicking Synchronize next to IAM User Sync on the Dashboard page of the cluster details.
- You have logged in to MRS Manager. For how to log in, see Accessing MRS Manager.
Adding a Tenant on the MRS Management Console
- Log in to the MRS console.
- On the Active Clusters page, select a running cluster and click its name to switch to the cluster details page.
- On the MRS cluster details page, click Tenant.
- Click Create Tenant. On the displayed page, configure tenant properties by referring to the following table.
Table 1 Tenant property parameters (MRS 3.x) Parameter
Description
Name
- Name of the current tenant, which can contain digits, letters, and underscores (_).
- Plan a tenant name based on service requirements. The name cannot be the same as that of a role, HDFS directory, or YARN queue that exists in the current cluster.
Tenant Type
Whether a tenant is a leaf tenant.
In some versions, this parameter is named Tenant Resource Type.
- When Leaf Tenant is selected, the current tenant is a leaf tenant and no sub-tenant can be added.
- When Non-leaf Tenant is selected, the current tenant is not a leaf tenant and sub-tenants can be added to the current tenant.
NOTE:MRS 3.2.0 or later: If you select ClickHouse for Service, this parameter can only be set to Leaf Tenant.
Compute Resource
Compute resources can be used by the tenant.
- When Yarn is selected, the system automatically creates a queue in Yarn and the queue is named the same as the tenant name.
- A leaf tenant can directly submit jobs to the queue.
- A non-leaf tenant cannot directly submit jobs to the queue. However, YARN adds an extra queue (hidden) named default for the non-leaf tenant to record the remaining resource capacity of the tenant. Actual jobs do not run in this queue.
- If Yarn is not selected, the system does not automatically create a queue.
Configuration Mode
If Yarn is selected for Compute Resource, this parameter can be set to Basic or Advanced.
- Basic: Configure the percentage of compute resources used by the tenant in the default resource pool by specifying Default Resource Pool Capacity (%).
- Advanced: Configure the following parameters for advanced settings:
- Weight: Tenant resource weight. The value ranges from 0 to 100. Tenant resource weight = Tenant weight/Total weight of tenants at the same level
- Minimum Resources: resources preempted by the tenant. The value is a percentage or absolute value of the parent tenant's resources. When a tenant's workload is light, their resources are automatically lent to other tenants. When available resources are fewer than Minimum Resources, the tenant can preempt the resources that were lent out.
- Maximum Resources: maximum resources that can be used by a tenant. The value is a percentage or absolute value of the parent tenant's resources.
- Reserved Resources: resources reserved for the tenant. The reserved resources cannot be used by other tenants even if no job is using resources of the tenant. The value is a percentage or absolute value of the parent tenant's resources.
Storage Resource
Storage resources selected for the current tenant.
- If HDFS is selected, the system automatically creates a file folder named after the tenant name in the /tenant directory. When a tenant is created for the first time, the system automatically creates the /tenant directory in the HDFS root directory.
- If HDFS is not selected, the system does not create a storage directory under the root directory of HDFS.
Maximum Number of Files/Directories
Maximum number of files or directories that can be created in HDFS. Set this parameter when Storage Resource is HDFS.
Storage Space Quota
Specifies the quota for HDFS storage space used by the current tenant. Set this parameter when Storage Resource is HDFS.
- The minimum value is 1, and the unit is MB or GB.
- This parameter indicates the maximum HDFS storage space that can be used by a tenant, but does not indicate 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, one backup is automatically generated for each file saved in HDFS, that is, two copies are generated in total. The HDFS storage space indicates the total disk space occupied by all these copies. For example, if the value is set to 500 MB, the actual space for storing files is about 250 MB (500/2 = 250).
Storage Path
HDFS directory for tenant resource data.
- The system automatically creates a file folder named after the tenant name in the /tenant directory by default. For example, the default HDFS storage directory for tenant ta1 is /tenant/ta1.
- When a tenant is created for the first time, the system automatically creates the /tenant directory in the HDFS root directory. The storage path is customizable.
Service
Other service resources associated with the tenant. (This parameter is grayed out if the cluster has no components that support service association.)
Click Associate Service and select a service name from the Service drop-down list box. 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.
Table 2 Tenant parameters (MRS 2.x and earlier versions) Parameter
Description
Name
- Name of the current tenant, which can contain digits, letters, and underscores (_).
- Plan a tenant name based on service requirements. The name cannot be the same as that of a role, HDFS directory, or YARN queue that exists in the current cluster.
Tenant Type
Whether the tenant is a leaf tenant.
- When Leaf Tenant is selected, the current tenant is a leaf tenant and no sub-tenant can be added.
- When Non-leaf Tenant is selected, the current tenant is not a leaf tenant and sub-tenants can be added to the current tenant.
Compute Resource
Compute resources can be used by the tenant. (In some versions, the parameter is named Dynamic Resource.)
- When Yarn is selected, the system automatically creates a queue in Yarn and the queue is named the same as the tenant name.
- A leaf tenant can directly submit jobs to the queue.
- A non-leaf tenant cannot directly submit jobs to the queue. However, YARN adds an extra queue (hidden) named default for the non-leaf tenant to record the remaining resource capacity of the tenant. Actual jobs do not run in this queue.
- If Yarn is not selected, the system does not automatically create a queue.
Default Resource Pool Capacity (%)
Percentage of the compute resources used by the current tenant in the default resource pool. This parameter is configured when YARN is the Compute Resource.
Default Resource Pool Max. Capacity (%)
Maximum percentage of the compute resources used by the current tenant in the default resource pool. This parameter is configured when YARN is the Compute Resource.
Storage Resource
Storage resources selected for the current tenant.
- If HDFS is selected, the system automatically creates a file folder named after the tenant name in the /tenant directory. When a tenant is created for the first time, the system automatically creates the /tenant directory in the HDFS root directory.
- If HDFS is not selected, the system does not create a storage directory under the root directory of HDFS.
Storage Space Quota (MB)
Specifies the quota for HDFS storage space used by the current tenant. Set this parameter when Storage Resource is HDFS.
- The minimum value is 1, and the unit is MB or GB.
- This parameter indicates the maximum HDFS storage space that can be used by a tenant, but does not indicate 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, one backup is automatically generated for each file saved in HDFS, that is, two copies are generated in total. The HDFS storage space indicates the total disk space occupied by all these copies. For example, if the value is set to 500 MB, the actual space for storing files is about 250 MB (500/2 = 250).
Storage Path
HDFS storage directory for the tenant.
- The system automatically creates a file folder named after the tenant name in the /tenant directory by default. For example, the default HDFS storage directory for tenant ta1 is /tenant/ta1.
- When a tenant is created for the first time, the system automatically creates the /tenant directory in the HDFS root directory. The storage path is customizable.
Service
Other service resources associated with the tenant. (This parameter is grayed out if the cluster has no components that support service association.)
Click Associate Service and select a service name from the Service drop-down list box. 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.
- Click OK to save. Wait until the tenant is created.
In the tenant list on the left, click the name of the created tenant to view its basic information, resource quotas, and charts.
- Roles, computing resources, and storage resources are automatically created when tenants are created.
- The new role has permissions on the computing and storage resources. The role and its permissions 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 Binding Tenant to an MRS Cluster User.
Adding a Tenant on Manager (for MRS 3.x and Later)
- Log in to Manager and choose Tenant Resources.
- Click . On the page that is displayed, configure tenant properties according to Table 3.
Table 3 Tenant property parameters (MRS 3.x) Parameter
Description
Name
- Name of the current tenant, which can contain digits, letters, and underscores (_).
- Plan a tenant name based on service requirements. The name cannot be the same as that of a role, HDFS directory, or YARN queue that exists in the current cluster.
Tenant Type
Whether a tenant is a leaf tenant.
In some versions, this parameter is named Tenant Resource Type.
- When Leaf Tenant is selected, the current tenant is a leaf tenant and no sub-tenant can be added.
- When Non-leaf Tenant is selected, the current tenant is not a leaf tenant and sub-tenants can be added to the current tenant.
NOTE:MRS 3.2.0 or later: If you select ClickHouse for Service, this parameter can only be set to Leaf Tenant.
Compute Resource
Compute resources can be used by the tenant.
- When Yarn is selected, the system automatically creates a queue in Yarn and the queue is named the same as the tenant name.
- A leaf tenant can directly submit jobs to the queue.
- A non-leaf tenant cannot directly submit jobs to the queue. However, YARN adds an extra queue (hidden) named default for the non-leaf tenant to record the remaining resource capacity of the tenant. Actual jobs do not run in this queue.
- If Yarn is not selected, the system does not automatically create a queue.
Configuration Mode
If Yarn is selected for Compute Resource, this parameter can be set to Basic or Advanced.
- Basic: Configure the percentage of compute resources used by the tenant in the default resource pool by specifying Default Resource Pool Capacity (%).
- Advanced: Configure the following parameters for advanced settings:
- Weight: Tenant resource weight. The value ranges from 0 to 100. Tenant resource weight = Tenant weight/Total weight of tenants at the same level
- Minimum Resources: resources preempted by the tenant. The value is a percentage or absolute value of the parent tenant's resources. When a tenant's workload is light, their resources are automatically lent to other tenants. When available resources are fewer than Minimum Resources, the tenant can preempt the resources that were lent out.
- Maximum Resources: maximum resources that can be used by a tenant. The value is a percentage or absolute value of the parent tenant's resources.
- Reserved Resources: resources reserved for the tenant. The reserved resources cannot be used by other tenants even if no job is using resources of the tenant. The value is a percentage or absolute value of the parent tenant's resources.
Storage Resource
Storage resources selected for the current tenant.
- If HDFS is selected, the system automatically creates a file folder named after the tenant name in the /tenant directory. When a tenant is created for the first time, the system automatically creates the /tenant directory in the HDFS root directory.
- If HDFS is not selected, the system does not create a storage directory under the root directory of HDFS.
Maximum Number of Files/Directories
Maximum number of files or directories that can be created in HDFS. Set this parameter when Storage Resource is HDFS.
Storage Space Quota
Specifies the quota for HDFS storage space used by the current tenant. Set this parameter when Storage Resource is HDFS.
- The minimum value is 1, and the unit is MB or GB.
- This parameter indicates the maximum HDFS storage space that can be used by a tenant, but does not indicate 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, one backup is automatically generated for each file saved in HDFS, that is, two copies are generated in total. The HDFS storage space indicates the total disk space occupied by all these copies. For example, if the value is set to 500 MB, the actual space for storing files is about 250 MB (500/2 = 250).
Storage Path
HDFS directory for tenant resource data.
- The system automatically creates a file folder named after the tenant name in the /tenant directory by default. For example, the default HDFS storage directory for tenant ta1 is /tenant/ta1.
- When a tenant is created for the first time, the system automatically creates the /tenant directory in the HDFS root directory. The storage path is customizable.
Service
Other service resources associated with the tenant. (This parameter is grayed out if the cluster has no components that support service association.)
Click Associate Service and select a service name from the Service drop-down list box. 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.
Roles, computing resources, and storage resources are automatically created when tenants are created.
- The new role has permissions on the computing and storage resources. This role and its permissions are automatically controlled by the system and cannot be manually managed by choosing System > Permission > Role. The role name is in the format of Tenant name_Cluster ID. The ID of the first cluster is not displayed by default.
- When using this tenant, create a system user and bind the user to the role of the tenant. For details, see Binding Tenant to an MRS Cluster User.
- During the tenant creation, the system automatically creates a YARN queue named after the tenant. If the queue name already exists, the new queue is named Tenant name-N. N indicates a natural number starting from 1. When a same name exists, the value N increases automatically to differentiate the queue from others. For example, saletenant, saletenant-1, and saletenant-2.
If you need to associate a service, click Associate Service, configure other service resources associated with the tenant by referring to the following instructions, and click OK.- Set Service to HBase and Association Type to Exclusive or Shared.
- Exclusive indicates that the service resources are used by the tenant exclusively and cannot be associated with other tenants.
- Shared indicates that the service resources can be shared with other tenants.
- MRS 3.2.0 or later: Select ClickHouse for Service.
- Association Type: When Service is set to ClickHouse, Association Type can only be set to Shared.
- Associate Logical Cluster: If the logical cluster function is not enabled for ClickHouse, default_cluster is selected by default. If the function is enabled, select the logical cluster to which you want to associate.
- CPU Priority: The CPU priority ranges from –20 to 19. This value is associated with the NICE value of the OS. A smaller value indicates a higher CPU priority.
- Memory: The maximum value of this parameter is 100, in percentage. For example, if this parameter is set to 80, the total memory that can be used by the current tenant is calculated as follows: Available memory x 80%.
- Only HBase can be associated with a new tenant. However, HDFS, HBase, and YARN can be associated with existing tenants.
- To associate an existing tenant with service resources, click the target tenant in the tenant list, switch to the Service Associations page, and click Associate Service to configure resources to be associated with the tenant.
- To disassociate an existing tenant from service resources, click the target tenant in the tenant list, switch to the Service Associations page, and click Delete in the Operation column. In the displayed dialog box, select I have read the information and understand the impact and click OK.
- Click OK. Wait until the system displays a message indicating that the tenant is successfully created.
Adding a Tenant on Manager (for MRS 2.x and Later)
- On MRS Manager, click Tenant.
- Click Create Tenant. On the displayed page, configure tenant properties.
Table 4 Tenant parameters (MRS 2.x and earlier versions) Parameter
Description
Name
- Name of the current tenant, which can contain digits, letters, and underscores (_).
- Plan a tenant name based on service requirements. The name cannot be the same as that of a role, HDFS directory, or YARN queue that exists in the current cluster.
Tenant Type
Whether the tenant is a leaf tenant.
- When Leaf Tenant is selected, the current tenant is a leaf tenant and no sub-tenant can be added.
- When Non-leaf Tenant is selected, the current tenant is not a leaf tenant and sub-tenants can be added to the current tenant.
Compute Resource
Compute resources can be used by the tenant. (In some versions, the parameter is named Dynamic Resource.)
- When Yarn is selected, the system automatically creates a queue in Yarn and the queue is named the same as the tenant name.
- A leaf tenant can directly submit jobs to the queue.
- A non-leaf tenant cannot directly submit jobs to the queue. However, YARN adds an extra queue (hidden) named default for the non-leaf tenant to record the remaining resource capacity of the tenant. Actual jobs do not run in this queue.
- If Yarn is not selected, the system does not automatically create a queue.
Default Resource Pool Capacity (%)
Percentage of the compute resources used by the current tenant in the default resource pool. This parameter is configured when YARN is the Compute Resource.
Default Resource Pool Max. Capacity (%)
Maximum percentage of the compute resources used by the current tenant in the default resource pool. This parameter is configured when YARN is the Compute Resource.
Storage Resource
Storage resources selected for the current tenant.
- If HDFS is selected, the system automatically creates a file folder named after the tenant name in the /tenant directory. When a tenant is created for the first time, the system automatically creates the /tenant directory in the HDFS root directory.
- If HDFS is not selected, the system does not create a storage directory under the root directory of HDFS.
Storage Space Quota (MB)
Specifies the quota for HDFS storage space used by the current tenant. Set this parameter when Storage Resource is HDFS.
- The minimum value is 1, and the unit is MB or GB.
- This parameter indicates the maximum HDFS storage space that can be used by a tenant, but does not indicate 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, one backup is automatically generated for each file saved in HDFS, that is, two copies are generated in total. The HDFS storage space indicates the total disk space occupied by all these copies. For example, if the value is set to 500 MB, the actual space for storing files is about 250 MB (500/2 = 250).
Storage Path
HDFS storage directory for the tenant.
- The system automatically creates a file folder named after the tenant name in the /tenant directory by default. For example, the default HDFS storage directory for tenant ta1 is /tenant/ta1.
- When a tenant is created for the first time, the system automatically creates the /tenant directory in the HDFS root directory. The storage path is customizable.
Service
Other service resources associated with the tenant. (This parameter is grayed out if the cluster has no components that support service association.)
Click Associate Service and select a service name from the Service drop-down list box. 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.
- Click OK to save. Wait until the tenant is created.
- Roles, computing resources, and storage resources are automatically created when tenants are created.
- The new role has permissions on the computing and storage resources. The role and its permissions 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 Binding Tenant to an MRS Cluster User.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot