Help Center> MapReduce Service> Component Operation Guide (LTS)> Using CDL> CDL FAQs> What Should I When a CDL Task Is Executed to Synchronize Data to the Hudi, an Error Message Indicating that the Current User Does Not Have the Permission to Create Tables in the Database Created by Another User?
Updated on 2024-05-29 GMT+08:00

What Should I When a CDL Task Is Executed to Synchronize Data to the Hudi, an Error Message Indicating that the Current User Does Not Have the Permission to Create Tables in the Database Created by Another User?

Symptom

After a CDL task is executed to synchronize data to Hudi, log in to FusionInsight Manager, choose Cluster > Services > Yarn, and click ResourceManager Web UI to access the Yarn web UI. In the task list, click the task ID, then Logs, and an error message is displayed, indicating that the current user does not have the permission to create a table. The error message is as follows:

org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAccessControlException: Permission denied: Principal [name=xxx, type=USER] does not have following privileges for operation CREATETABLE [[CREATE] on Object [type=DATABASE, name=xxx]]

Possible Cause

The CDL service user does not have the permission to create tables in a database created by other users.

Procedure

  1. Log in to FusionInsight Manager, choose System > Role > Add Role, and enter the role name. In the Configure Resource Permission table, locate the cluster to be operated, choose Hive > Hive Read and Write Permission, select Query, Delete, Insert, Create, Grant of Select, Grant of Delete, Grant of Insert, and Recursive, and click OK.
  2. Click User, locate the user of the task, and click Modify. Add the role created in 1, and click OK.
  3. Choose Cluster > Services > CDL. Click the hyperlink on the right of CDLService UI to go to the CDL web UI. In the row where the job is located, choose More > Stop to stop the CDL task. After the task is stopped, click Start to restart the task.