Help Center/ MapReduce Service/ Component Operation Guide (LTS) (Ankara Region)/ Using Spark/ Spark FAQ/ Spark Ranger FAQ/ Why Is a Permission Exception Reported When Ranger Authentication and UDFs Are Used?
Updated on 2024-11-29 GMT+08:00

Why Is a Permission Exception Reported When Ranger Authentication and UDFs Are Used?

Question

When Ranger authentication is used and user-defined functions (UDFs) are used, a permission exception is reported.

Causes

If Ranger authentication is used, you must have the administrator permission to create, use, and delete functions. You can perform the management operations only after the administrator permissions are updated.

Solution

Add the admin permission of the user to Ranger.

  1. Log in to the Ranger management page as user rangeradmin by referring to Logging In to the Ranger Web UI.
  2. On the home page, click Settings and choose Roles.

  3. Click the role with Role Name set to admin. In the Users area, click Select User and select a username.
  4. Click Add Users, select Is Role Admin in the row where the username is located, and click Save.

Update the administrator permissions of a user.

  1. Use PuTTY to log in to the node where the Spark client is installed as the client installation user and run the following commands:

    source {Spark client installation directory}/bigdata_env

    kinit Spark service user

    spark-beeline

  2. Run the following command to update the administrator permissions of the user:

    set role admin;