Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hive is throwing permission error while creating table/database

I am getting permission error in hive.

I am using IBM cloud - my.imdemocloud.com

hive> create table a(key INT); FAILED: Error in metadata: MetaException(message:Got exception: org.apache.hadoop.security.AccessControlException org.apache.hadoop.security.AccessControlException: Permission denied: user=nehpraka, access=WRITE, inode="warehouse":biadmin:biadmin:rwxrwxr-x) FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Where as I have given all the roles to m user.

hive> SHOW GRANT USER nehpraka on DATABASE default; OK

database default principalName nehpraka principalType USER privilege Create grantTime Wed Apr 16 14:17:51 EDT 2014 grantor nehpraka Time taken: 0.051 seconds

Please help me out in this.

Thanks & Ragards

like image 855
orNehPraka Avatar asked Apr 16 '14 19:04

orNehPraka


People also ask

How do I give permission to Hive database?

​Provide User Access to Hive Database Tables from the Command Line. Syntax: grant <permissions> on table <table> to user <user or group> ; For example, to create a policy that grants user1 SELECT permission on the table default-hivesmoke22074, the command is grant select on table default.

How do I check my Hive database permissions?

When a user runs a Hive query or command, the privileges granted to the user and her "current roles" are checked. The current roles can be seen using the " show current roles; " command.

How does Hive connect to database?

Create a Connection to Hive DataIn the Databases menu, click New Connection. In the Create new connection wizard that results, select the driver. On the next page of the wizard, click the driver properties tab. Enter values for authentication credentials and other properties required to connect to Hive.


1 Answers

I got the solution.

I was using IBM Big Insight cloud, on this we can create a database in this manner.

create database DataBaseName location 'hdfs://master-1-internal.imdemocloud.com:9000/user/<user_name>';

Thanks all for helping me.

like image 59
orNehPraka Avatar answered Sep 21 '22 17:09

orNehPraka