Updated on 2026-08-29 GMT+08:00

Allowing Non-Admin Users to Create Temporary Functions

Scenarios

In Hive, temporary functions exist only within the current session or specific queries. They are typically used for specialized computation or data processing requirements. In the open-source Hive community edition, users who create temporary functions must have ADMIN privileges.

By default, users who create temporary functions in MRS Hive must have ADMIN privileges. You can use the hive.security.temporary.function.need.admin parameter to configure the system so that users do not need ADMIN privileges to create temporary functions. Setting this parameter to false introduces security risks.

Notes and Constraints

  • When Kerberos authentication is enabled for the cluster (in security mode), configuring whether users need ADMIN privileges to create temporary functions is supported only in the ACL authentication scenario.
  • When Ranger authentication is enabled for Hive, creating a permanent function requires the global permission, while creating a temporary function requires the Temporary UDF Admin permission. For details, see Creating User-Defined Hive Functions.

Procedure

  1. Log in to FusionInsight Manager, choose Cluster > Services > Hive, and click Configurations and then All Configurations.
  2. Enter hive.security.temporary.function.need.admin in the search box, and then change its parameter value to true or false based on your requirements.

    • When this parameter is set to true, the ADMIN privileges are required for creating temporary functions, which is the same as that in the open-source community.
    • When this parameter is set to false, ADMIN privileges are not required to create temporary functions, which poses security risks. Exercise caution if you choose to disable this requirement.

  3. Click Save to save the settings. Click the Instances tab, select all HiveServer instances, click More, select Restart Instance, enter your user password, and click OK to restart the instances.
  4. Create and use a temporary function on the Hive client. For details, seeCreating User-Defined Hive Functions.