Updated on 2024-10-25 GMT+08:00

Creating an HDFS Role

Scenario

This section describes how to create and configure an HDFS role on FusionInsight Manager. The HDFS role is granted the rights to read, write, and execute HDFS directories or files.

A user has the complete permission on the created HDFS directories or files, that is, the user can directly read data from and write data to as well as authorize others to access the HDFS directories or files.

  • An HDFS role can be created only in security mode.
  • If the current component uses Ranger for permission control, HDFS policies must be configured based on Ranger for permission management. For details, see Adding a Ranger Access Permission Policy for HDFS.

Procedure

  1. Log in to FusionInsight Manager, and choose System > Permission > Role.
  2. On the displayed page, click Create Role and fill in Role Name and Description.
  3. Configure the resource permission. For details, see Table 1.

    Table 1 Setting a role

    Task

    Operation

    Setting the HDFS administrator permission

    In the Configure Resource Permission area, choose Name of the desired cluster > HDFS, and select Cluster Admin Operations.

    NOTE:

    The setting takes effect after the HDFS service is restarted.

    Setting the permission for users to check and recover HDFS

    1. In the Configure Resource Permission area, choose Name of the desired cluster > HDFS > File System.
    2. Locate the save path of specified directories or files on HDFS.
    3. In the Permission column of the specified directories or files, select Read and Execute.

    Setting the permission for users to read directories or files of other users

    1. In the Configure Resource Permission area, choose Name of the desired cluster > HDFS > File System.
    2. Locate the save path of specified directories or files on HDFS.
    3. In the Permission column of the specified directories or files, select Read and Execute.

    Setting the permission for users to write data to files of other users

    1. In the Configure Resource Permission area, choose Name of the desired cluster > HDFS > File System.
    2. Locate the save path of specified files on HDFS.
    3. In the Permission column of the specified files, select Write and Execute.

    Setting the permission for users to create or delete sub-files or sub-directories in the directory of other users

    1. In the Configure Resource Permission area, choose Name of the desired cluster > HDFS > File System.
    2. Locate the path where the specified directory is saved in the HDFS.
    3. In the Permission column of the specified directories, select Write and Execute.

    Setting the permission for users to execute directories or files of other users

    1. In the Configure Resource Permission area, choose Name of the desired cluster > HDFS > File System.
    2. Locate the save path of specified directories or files on HDFS.
    3. In the Permission column of the specified directories or files, select Execute.

    Setting the permission for allowing subdirectories to inherit all permissions of their parent directories

    1. In the Configure Resource Permission area, choose Name of the desired cluster > HDFS > File System.
    2. Locate the save path of specified directories or files on HDFS.
    3. In the Permission column of the specified directories or files, select Recursive.
    • File System: HDFS directory and file permission.
    • Common HDFS directories are as follows:
      • flume: Flume data storage directory
      • hbase: HBase data storage directory
      • mr-history: MapReduce task information storage directory
      • tmp: temporary data storage directory
      • user: user data storage directory

  4. Click OK, and return to the Role page.