nexr / RHive

RHive is an R extension facilitating distributed computing via Apache Hive.
http://nexr.github.io/RHive
122 stars 63 forks source link

Hue Insufficient privileges to execute ADD #90

Closed myloginid closed 8 years ago

myloginid commented 8 years ago

Hi,

While doing a rhive.connect() we get the error of Insufficient Privileges to execute ADD. Is there some fix for this or some documentation on what are the privileges that are required in Cloudera Manager/ Sentry to use RHive?

2015-08-31 19:51:59,711 WARN org.apache.hive.service.cli.thrift.ThriftCLIService: Error executing statement: org.apache.hive.service.cli.HiveSQLException: Insufficient privileges to execute ADD at org.apache.hive.service.cli.operation.ExecuteStatementOperation.newExecuteStatementOperation(ExecuteStatementOperation.java:53) at org.apache.hive.service.cli.operation.OperationManager.newExecuteStatementOperation(OperationManager.java:122) at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:394) at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:385) at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:271) at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:490) at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1313) at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1298) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56) at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: Insufficient privileges to execute ADD at org.apache.hadoop.hive.ql.processors.CommandProcessorFactory.getForHiveCommandInternal(CommandProcessorFactory.java:73) at org.apache.hadoop.hive.ql.processors.CommandProcessorFactory.getForHiveCommand(CommandProcessorFactory.java:54) at org.apache.hive.service.cli.operation.ExecuteStatementOperation.newExecuteStatementOperation(ExecuteStatementOperation.java:51) ... 14 more

Thanks, Manish

ghost commented 8 years ago

Hi @myloginid .

Look at the ranger branch. We remove add jar step but must deploy rhive_udf.jar to hive aux lib or something like for UDFs.

puneetduain commented 8 years ago

Hi

I used nexr-rhive-2.0.10-ranger, after installation and execution, below errors observed

library(RHive) Loading required package: rJava Loading required package: Rserve rhive.connect("10.92.139.143",10000,hiveServer2); Error: class not found

If I download from http://nexr.github.io/RHive/, then "Insufficient Privileges to execute ADD" reappears.

Thanks Puneet

ghost commented 8 years ago

Hi, @puneetduain Did you add hive.aux.jars.path to hive-site.xml ? If not, add this to hive-site.xml then restart hive-server2:

<property>
  <name>hive.aux.jars.path</name>
  <value>/path/to/rhive_udf.jar,/other/aux/jars.jar</value>
</property>
ghost commented 8 years ago

Hi @myloginid , @puneetduain . If your problem solved, Would you please close this issue?

Thanks.

myloginid commented 8 years ago

Confirm Solved. Thanks for the support.

Tagar commented 8 years ago

Also look at https://issues.apache.org/jira/browse/SENTRY-905