Comments (7)
Hi, @Worvast First of all, make sure you use ranger
branch. ranger
branch dose not use ADD JAR
, so should not meet the privilege problem.
Thanks.
from rhive.
Hi @DrakeMin, this change fix the error thanks, but now we receive other :P
Required privileges for this query: Server=server1->URI=file:///opt/local/hive/lib/rhive_udf.jar->action=*;
Perhaps to give privileges to users to use that jar worth? It would directly but is an annoying bureaucratic process and I prefer to ask before
from rhive.
Mmmm, ok @DrakeMin they finally add privileges for the JAR but now we have other error when connect.
Error: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException Error retrieving udf class
I will look for information but I want to put here this too.
from rhive.
@Worvast IMO, more specific messages(usually Caused by ...
) are somewhere in the hive-server2.log
file. Let me see them if possible.
from rhive.
Hi @DrakeMin ty very much for the help, i think this is important part of rhive log:
2015-11-05 11:32:49,683 INFO org.apache.sentry.binding.hive.conf.HiveAuthzConf: DefaultFS: hdfs://nameservice1
2015-11-05 11:32:49,696 INFO org.apache.sentry.binding.hive.conf.HiveAuthzConf: DefaultFS: hdfs://nameservice1
2015-11-05 11:32:49,696 WARN org.apache.sentry.binding.hive.conf.HiveAuthzConf: Using the deprecated config setting hive.sentry.server instead of sentry.hive.server
2015-11-05 11:32:49,696 WARN org.apache.sentry.binding.hive.conf.HiveAuthzConf: Using the deprecated config setting hive.sentry.provider instead of sentry.provider
2015-11-05 11:32:49,704 ERROR org.apache.hadoop.hive.ql.Driver: FAILED: SemanticException Error retrieving udf class
org.apache.hadoop.hive.ql.parse.SemanticException: Error retrieving udf class
at org.apache.sentry.binding.hive.HiveAuthzBindingHook.preAnalyze(HiveAuthzBindingHook.java:232)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:420)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:306)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1111)
at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1105)
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:100)
at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:171)
at org.apache.hive.service.cli.operation.Operation.run(Operation.java:257)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:398)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:385)
at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:258)
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.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:692)
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.lang.ClassNotFoundException: com.nexr.rhive.hive.udf.RUDF
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.apache.sentry.binding.hive.HiveAuthzBindingHook.preAnalyze(HiveAuthzBindingHook.java:221)
... 20 more
2015-11-05 11:32:49,704 INFO org.apache.hadoop.hive.ql.log.PerfLogger: </PERFLOG method=compile start=1446719569669 end=1446719569704 duration=35 from=org.apache.hadoop.hive.ql.Driver>
2015-11-05 11:32:49,704 INFO org.apache.hadoop.hive.ql.log.PerfLogger: <PERFLOG method=releaseLocks from=org.apache.hadoop.hive.ql.Driver>
2015-11-05 11:32:49,704 INFO org.apache.hadoop.hive.ql.log.PerfLogger: </PERFLOG method=releaseLocks start=1446719569704 end=1446719569704 duration=0 from=org.apache.hadoop.hive.ql.Driver>
2015-11-05 11:32:49,704 INFO org.apache.hadoop.hive.ql.log.PerfLogger: <PERFLOG method=releaseLocks from=org.apache.hadoop.hive.ql.Driver>
2015-11-05 11:32:49,704 INFO org.apache.hadoop.hive.ql.log.PerfLogger: </PERFLOG method=releaseLocks start=1446719569704 end=1446719569704 duration=0 from=org.apache.hadoop.hive.ql.Driver>
2015-11-05 11:32:49,704 WARN org.apache.hive.service.cli.thrift.ThriftCLIService: Error executing statement:
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException Error retrieving udf class
at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:315)
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:102)
at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:171)
at org.apache.hive.service.cli.operation.Operation.run(Operation.java:257)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:398)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:385)
at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:258)
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.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:692)
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: org.apache.hadoop.hive.ql.parse.SemanticException: Error retrieving udf class
at org.apache.sentry.binding.hive.HiveAuthzBindingHook.preAnalyze(HiveAuthzBindingHook.java:232)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:420)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:306)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1111)
at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1105)
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:100)
... 15 more
Caused by: java.lang.ClassNotFoundException: com.nexr.rhive.hive.udf.RUDF
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.apache.sentry.binding.hive.HiveAuthzBindingHook.preAnalyze(HiveAuthzBindingHook.java:221)
... 20 more
from rhive.
Hi, @Worvast. I think you should rewrite below lines in the RHive/R/rhive.R
:
.registerUDFs <- function(hiveClient) {
hiveClient$execute(sprintf("CREATE TEMPORARY FUNCTION %s AS \"%s\"", "R", "com.nexr.rhive.hive.udf.RUDF"))
hiveClient$execute(sprintf("CREATE TEMPORARY FUNCTION %s AS \"%s\"", "RA", "com.nexr.rhive.hive.udf.RUDAF"))
hiveClient$execute(sprintf("CREATE TEMPORARY FUNCTION %s AS \"%s\"", "unfold", "com.nexr.rhive.hive.udf.GenericUDTFUnFold"))
hiveClient$execute(sprintf("CREATE TEMPORARY FUNCTION %s AS \"%s\"", "expand", "com.nexr.rhive.hive.udf.GenericUDTFExpand"))
hiveClient$execute(sprintf("CREATE TEMPORARY FUNCTION %s AS \"%s\"", "rkey", "com.nexr.rhive.hive.udf.RangeKeyUDF"))
hiveClient$execute(sprintf("CREATE TEMPORARY FUNCTION %s AS \"%s\"", "scale", "com.nexr.rhive.hive.udf.ScaleUDF"))
hiveClient$execute(sprintf("CREATE TEMPORARY FUNCTION %s AS \"%s\"", "array2String", "com.nexr.rhive.hive.udf.GenericUDFArrayToString"))
}
Thanks.
from rhive.
Done. Not permission to create temporary functions en HIVE. Granted and solved.
from rhive.
Related Issues (20)
- Package ‘RHive’ was removed from the CRAN repository. HOT 1
- dependencies ‘rJava’, ‘Rserve’ are not available for package ‘RHive’ HOT 1
- rhive.connect() Insufficient privileges to execute ADD HOT 1
- Could RHive used in Windows ? HOT 1
- Unable to view MR jobs associated with Rhive query in ResourceManager WebUI
- Error with function rhive.load.table HOT 1
- Unable to connect using rhive.connect( )
- rhive.connect() Error: java.io.IOException: Create failed for file... HOT 1
- rhive.connect() error HOT 1
- Only simple query works but not complex queries or agreegated functions HOT 5
- Hue Insufficient privileges to execute ADD HOT 6
- rhive.conect class not found HOT 2
- Cannot modify RHIVE_UDF_DIR at runtime HOT 10
- rhive.connect() -> Exception in thread java.lang.RuntimeException: java.sql.SQLException: java.lang.ClassNotFoundException HOT 4
- RHive kerberos issue on CDH HOT 6
- Error while processing statement: Failed to read external resource hdfs://xxx:9000/rhive/rhive/lib/2.0-0.10/rhive_udf.jar using rhive.connect HOT 8
- Ant Build Failure HOT 2
- File not found exception while running queries on UDAF HOT 1
- Cannot modify mapred.child.env at runtime, persists after modifying the hive-site.xml file HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rhive.