Giter VIP home page Giter VIP logo

Comments (7)

 avatar commented on August 15, 2024

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.

Worvast avatar Worvast commented on August 15, 2024

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.

Worvast avatar Worvast commented on August 15, 2024

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.

 avatar commented on August 15, 2024

@Worvast IMO, more specific messages(usually Caused by ...) are somewhere in the hive-server2.log file. Let me see them if possible.

from rhive.

Worvast avatar Worvast commented on August 15, 2024

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.

 avatar commented on August 15, 2024

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.

Worvast avatar Worvast commented on August 15, 2024

Done. Not permission to create temporary functions en HIVE. Granted and solved.

from rhive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.