Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hbase shell error

Solved Go to solution

Re: Hbase shell error

Explorer
su -hive
Usage: su [options] [LOGIN]

Options:
-c, --command COMMAND pass COMMAND to the invoked shell
-h, --help display this help message and exit
-, -l, --login make the shell a login shell
-m, -p,
--preserve-environment do not reset environment variables, and
keep the same shell
-s, --shell SHELL use SHELL instead of the default in passwd

Re: Hbase shell error

Explorer

LOAD DATA LOCAL INPATH 'empdata.txt' OVERWRITE INTO TABLE emp;
Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: Principal [name=hive, type=USER] does not have following privileges for operation LOAD [ADMIN] (state=42000,code=40000)

Re: Hbase shell error

Mentor

@Manoj690 

Be careful when switching user in Linux don't forget a [ ] space between the su and dash and username   marked with x  below

# sux-xuser   --------- --> su [dash] -  [dash] user

Re: Hbase shell error

Explorer
LOAD DATA LOCAL INPATH 'empdata.txt' OVERWRITE INTO TABLE emp;
Error: Error while compiling statement: FAILED: HiveAccessControlException
Permission denied: Principal [name=hive, type=USER] does not have following
privileges for operation LOAD [ADMIN] (state=42000,code=40000)
Highlighted

Re: Hbase shell error

Expert Contributor

@Manoj690 Check if their is any ranger policy or you can try disabling Authorization for HiveServer2 as follows:
### Ambari UI > Hive > Configs > Advanced > Advanced Hiveserver2-Site > Uncheck "Enable Authorization" Option > Restart Hive Service and run the query

Re: Hbase shell error

Mentor

@Manoj690 

Can you check whether authorization has been delegated to Ranger/Kerbe/SQLAuth if you have Ranger plugin for Hive enabled then  the authorization has been delegated to Ranger the central authority. 

You will need to enable the permissions through ranger for all hive database

Hive > Configs > Settings > In Security it is set to ?

 

Don't have an account?
Coming from Hortonworks? Activate your account here