Help Center/
MapReduce Service/
User Guide (Paris Region)/
Troubleshooting/
Using Hive/
A Newly Created User Has No Query Permissions
Updated on 2024-10-11 GMT+08:00
A Newly Created User Has No Query Permissions
Symptom
When a user is created, an error message is displayed indicating that the user does not have permissions to query data.
Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: Principal [name=hive, type=USER] does not have following privileges for operation QUERY [[SELECT] on Object [type=TABLE_OR_VIEW, name=default.t1]] (state=42000,code=40000)
Cause Analysis
The newly created user does not have the permission to operate the Hive component.
Solution
MRS Manager:
- Log in to MRS Manager and choose System > Manage Role > Create Role.
- Enter a role name.
- In the Permission area, select Hive. The Hive administrator permission and the read and write permission for Hive tables are displayed.
- Select Hive Read Write Privileges. All databases in the Hive column are displayed.
- Select the permissions required by the role and click OK.
- On MRS Manager, choose System > Manage User.
- Locate the row that contains the created user, and click Modify in the Operation column.
- Click Select and Join User Group. To use the Hive service, you must add a Hive group.
- Click Select and Add Role and select the role created in 5.
- Click OK.
FusionInsight Manager:
- Log in to FusionInsight Manager. Choose System > Permission > Role.
- Click Create Role, and set Role name and Description.
- Set Configure Resource Permission for the role and select Hive Read and Write Permission for the Hive table. All databases in the Hive column are displayed.
- Select the permissions required by the role and click OK.
- On FusionInsight Manager, choose System > Permission > User.
- Locate the row that contains the created user, and click Modify in the Operation column.
- Click Add on the right of User Group. To use the Hive service, you must add a Hive group.
- Click Add on the right of Role and select the role created in 4.
- Click OK.
Parent topic: Using Hive
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot