/usr/local/Hbase/bin# ./hbase shell
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.java.invokers.RubyToJavaInvoker (file:/usr/local/Hbase/lib/jruby-complete-1.6.8.jar) to method java.lang.Object.registerNatives()
WARNING: Please consider reporting this to the maintainers of org.jruby.java.invokers.RubyToJavaInvoker
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
ArgumentError: wrong number of arguments (0 for 1)
method_added at file:/usr/local/Hbase/lib/jruby-complete-1.6.8.jar!/builtin/javasupport/core_ext/object.rb:10
method_added at file:/usr/local/Hbase/lib/jruby-complete-1.6.8.jar!/builtin/javasupport/core_ext/object.rb:129
Pattern at file:/usr/local/Hbase/lib/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:2
(root) at file:/usr/local/Hbase/lib/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:1
require at org/jruby/RubyKernel.java:1062
(root) at file:/usr/local/Hbase/lib/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:42
(root) at /usr/local/Hbase/bin/../bin/hirb.rb:38
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/Hbase/lib/phoenix-5.0.0-HBase-2.0-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/Hbase/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Created 11-07-2019 08:37 AM
This looks a hdfs permission, you are executing the command as the root user while the inode permission are hive:hadoop.See below
Error: Error while processing statement: FAILED: Execution Error, return
code 1 from org.apache.hadoop.hive.ql.exec.DDLTask.
MetaException(message:Got exception:
org.apache.hadoop.security.AccessControlException Permission denied:
user=root, access=EXECUTE,
inode="/warehouse/tablespace/managed/hive":hive:hadoop:drwx------
at
org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:399)
Can you do the following while logged on the CLI as root
# su - hive
$ hive
The execute your create table statement that should succeed if not share the log
Created 11-07-2019 08:04 PM
Created 11-07-2019 08:31 PM
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)
Created 11-07-2019 09:07 PM
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
Created 11-07-2019 09:09 PM
Created 11-07-2019 09:15 PM
@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
Created 11-07-2019 09:44 PM
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 ?