Insufficient Permissions to Execute the set role admin Command
Symptom
When a user runs the following command:
set role admin
The following error is reported:
0: jdbc:hive2://192.168.42.26:21066/> set role admin;Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. dmp_B doesn't belong to role admin (state=08S01,code=1)
Cause Analysis
The current user does not have the permissions of the admin role of Hive.
Solution
- Log in to Manager.
- For versions earlier than MRS 3.x, go to 7.
- For MRS 3.x or later, choose Cluster > Services > Hive. In the upper right corner of the Dashboard page, click More and check whether Enable Ranger is unavailable.
- Choose Cluster > Services > Ranger and click RangerAdmin in the Basic Information area. The Ranger web UI is displayed.
- Click the username in the upper right corner, select Log Out to log out of the system, and log in to the system as user rangeradmin.
- On the homepage, click Settings and choose Roles.
- Click the role with Role Name set to admin. In the Users area, click Select User and select a username.
- Click Add Users, select Is Role Admin in the row where the username is located, and click Save.
- Choose System > Permission > Role and add a role with the Hive administrator permission.
- On FusionInsight Manager, choose System > Permission > User.
- In the Operation column of the user, click Modify.
- Bind a role that has the Hive administrator permissions to the user and click OK.
Parent topic: Using Hive
- Symptom
- Cause Analysis
- Solution