Updated on 2022-11-18 GMT+08:00

Creating a HetuEngine Role

MRS cluster administrator can create and set a HetuEngine role on FusionInsight Manager. The HetuEngine role can be configured with the administrator permission or the permission of performing operations on the table data.

Creating a database with Hive requires users to join in the Hive group, without granting a role. Users have all permissions on the databases or tables created by themselves in Hive or HDFS. They can create tables, select, delete, insert, or update data, and grant permissions to other users to allow them to access the tables and corresponding HDFS directories and files. The created databases or tables are saved in the /user/hive/warehouse directory of HDFS by default.

Procedure

  1. Log in to FusionInsight Manager.
  2. Choose System > Permission > Role.
  3. Click Create Role, and set Role Name and Description.
  4. In the Configure Resource Permission area, choose Name of the desired cluster > Hive and set role permissions. For details, see Table 1.

    • Hive Admin Privilege: Hive administrator permission.
    • Hive Read Write Privileges: Hive data table management permission, which is the operation permission to set and manage the data of created tables.
    • Hive role management supports the administrator permission, and the permissions of accessing tables and views, without granting the database permission.
    • The permissions of the Hive administrator do not include the permission to manage HDFS.
    • If there are too many tables in the database or too many files in tables, the permission granting may last a while. For example, if a table contains 10,000 files, the permission granting lasts about 2 minutes.
    Table 1 Setting a role

    Scenario

    Role Authorization

    Setting the permission to query a table of another user in the default database

    1. In the View Name area, click Hive Read Write Privileges.
    2. Click the name of the specified database in the database list. Tables in the database are displayed.
    3. In the Permission column of a specified table, choose Select.

    Setting the permission to import data to a table of another user in the default database

    1. In the View Name area, click Hive Read Write Privileges.
    2. Click the name of the specified database in the database list. Tables in the database are displayed.
    3. In the Permission column of the specified indexes, select Delete and Insert.

  1. Click OK. Return to the Role page.