Updated on 2024-12-13 GMT+08:00

Managing Doris Tenants

The cluster administrator can create a Doris tenant on FusionInsight Manager.

Creating a Doris Tenant

  1. Log in to FusionInsight Manager and choose Tenant Resources.
  2. On the Tenant Resources Management page, click . On the displayed page, configure tenant properties by referring to Table 1.

    Table 1 Tenant parameters

    Parameter

    Description

    Name

    Specify the name of the current tenant. The value can contain 3 to 50 characters but cannot contain only digits. Only digits, letters, and underscores (_) are allowed.

    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

    Select Leaf Tenant.

    NOTE:

    A Doris tenant can only be a leaf tenant.

    Compute Resource

    Do not select Yarn if only Doris-related tenants are created.

    Storage Resource

    Do not select HDFS if only Doris-related tenants are created.

    Service

    Click Associate Service. In the displayed dialog box, set the following parameters and click OK:

    • Service: Select Doris.
    • Association Type: Maintain the default option Shared.

    For details about the following parameters, see Table 1.

    • CPU Usage Quota: specifies the weight of CPU resources occupied by a tenant. This parameter is valid during resource competition.
    • Memory Quota: specifies the maximum percentage of memory resources occupied by a tenant. For example, if this parameter is set to 10, the available memory of the tenant on each BE node is 10% of the available memory on the BE node. The default Doris tenant normal occupies 90% of the resources. Therefore, for other tenants this parameter can be set up to 10%. If the sum exceeds 100%, the Doris tenant fails to be created.
    • Concurrency: specifies the maximum number of concurrent query tasks a tenant can run. Excessive query tasks are queued.
    • Queue Length: specifies the maximum number of query tasks waiting in the queue.
    • Waiting Duration: specifies the maximum waiting duration of a query task. The unit is milliseconds.
    • Soft Memory Limit: By default, soft memory limit is disabled. If this option is enabled and when resources are sufficient, query tasks can use resources more than the limit. When resources are insufficient, the occupied memory is released. If this function is disabled and when the memory limit of a workload group is reached, som SQL statements will be canceled or rejected.

    Description

    Description of the tenant.

  3. Click OK. Wait until the tenant is created.
  4. View and modify the tenant in the Tenant Resources Management page.

    1. On FusionInsight Manager, click Tenant Resources. In the tenant list, select the desired Doris tenant and view the tenant information and the resource quota.
    2. Click Resource and click next to Resource Details to modify tenant resources.

    3. Click OK. The details are displayed in the Resource tab.
    • In the Summary tab, resource quota is not updated in real time. It is updated only when it is loaded.
    • A Doris tenant represents a workload group, which limits the compute resources of tasks in the group on a single instance node. The Resource Quota and Chart information show monitoring data of the average metric values. The chart is refreshed every 30 seconds.

Associating an Existing Tenant with Doris and a User

  1. On FusionInsight Manager, choose Tenant Resources. In the tenant list, select the desired tenant, click the Service Associations tab, and click Associate Service.
  2. On the displayed dialog box, set Service to Doris, set other parameters as you need, and click OK to associate the tenant with the Doris service.
  3. Click the User tab, and then click Associate User on the displayed page. Associate the tenant with a user, and click OK.

    • You can also create a user or associate a tenant with an existing user on the user list page by referring to Adding a User and Binding It to a Tenant.
    • A tenant can be associated with multiple users.
    • Doris tenants can be associated with human-machine and machine-machine users created on Manager.
      • If Kerberos authentication is enabled for the cluster (the cluster is in security mode), associate the tenant with a human-machine user.
      • If Kerberos authentication is disabled for the cluster (the cluster is in normal mode), associate the tenant with a machine-machine user.
    • If a common Doris user is associated (that is, the role of the user does not have the Doris administrator permission), the following error is reported when the user connects to Doris on the MySQL client, creates a table, and queries the table data:
      ERROR 1227 (42000): errCode = 2, detailMessage = Access denied; you need (at least one of) the USAGE/ADMIN privilege(s) to use workload group 'Tenant name'.

      Connect to Doris on the MySQL client as a user with the Doris administrator permission and run the following command to grant permission to the current user:

      GRANT USAGE_PRIV ON workload group 'Tenant name ' to 'User ame ';

  4. To disassociate the Doris service, click Delete in the Operation column of the Doris service. In the displayed dialog box, click OK.

    After a tenant is disassociated from the Doris service, the workload group of the Doris kernel is deleted, and the workload group of the users bound to the tenant is also set to normal.

Adding a User and Binding It to a Tenant

  • Create a user and bind it to a tenant: Log in to FusionInsight Manager, choose System > Permission > User, click Create, add a human-machine user (a machine-machine user if Kerberos authentication is disabled for the cluster (the cluster is in normal mode)), and add the created Doris tenant to the role.
  • Bind a tenant to an existing user: Log in to FusionInsight Manager, choose System > Permission > User, click Modify in the Operation column of the user, and add the created Doris tenant to the role.
  • To delete a Doris tenant, choose System > User, locate the row that contains the user in the user list, click Modify, and delete the Doris tenant bound added to the role.
  • A user cannot be bound to multiple Doris tenants. For example, if user1 has been associated with tenant1 of Doris, unbind user1 from tenant1 and then associate user1 with tenant2.
  • If Kerberos authentication is enabled for the cluster (the cluster is in security mode), associate a human-machine user with a Doris tenant. If Kerberos authentication is disabled for the cluster (the cluster is in normal mode), associate a machine-machine user with the Doris tenant.
  • If a common Doris user is associated (that is, the role of the user does not have the Doris administrator permission), the following error is reported when the user connects to Doris on the MySQL client, creates a table, and queries the table data:
    ERROR 1227 (42000): errCode = 2, detailMessage = Access denied; you need (at least one of) the USAGE/ADMIN privilege(s) to use workload group 'Tenant name'.

    Connect to Doris on the MySQL client as a user with the Doris administrator permission and run the following command to grant permission to the current user:

    GRANT USAGE_PRIV ON workload group 'Tenant name ' to 'User ame ';