It looks like when you call getFunctions on DatabaseMetaData you get a semantic 
exception if all functions aren't whitelisted. Is there a way around this or 
specific version it's fixed in? I either wouldn't expect introspection calls to 
get blocked or I'd expect restricted functions not to get returned in the list. 
Otherwise we break anything that uses these metadata to build a model of the 
database.

2018-11-25 11:19:29,992 WARN  [HiveServer2-Handler-Pool: Thread-57]: 
thrift.ThriftCLIService (ThriftCLIService.java:GetFunctions(623)) - Error 
getting functions:
org.apache.hive.service.cli.HiveSQLException: 
org.apache.hadoop.hive.ql.parse.SemanticException: UDF java_method is not 
allowed
        at 
org.apache.hive.service.cli.operation.GetFunctionsOperation.runInternal(GetFunctionsOperation.java:124)
        at 
org.apache.hive.service.cli.operation.Operation.run(Operation.java:264)
        at 
org.apache.hive.service.cli.session.HiveSessionImpl.getFunctions(HiveSessionImpl.java:648)
        at 
org.apache.hive.service.cli.CLIService.getFunctions(CLIService.java:403)
        at 
org.apache.hive.service.cli.thrift.ThriftCLIService.GetFunctions(ThriftCLIService.java:617)
        at 
org.apache.hive.service.cli.thrift.TCLIService$Processor$GetFunctions.getResult(TCLIService.java:1517)
        at 
org.apache.hive.service.cli.thrift.TCLIService$Processor$GetFunctions.getResult(TCLIService.java:1502)
        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:562)
        at 
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: UDF java_method 
is not allowed
        at 
org.apache.hadoop.hive.ql.exec.Registry.getFunctionInfo(Registry.java:254)
        at 
org.apache.hadoop.hive.ql.exec.FunctionRegistry.getFunctionInfo(FunctionRegistry.java:482)
        at 
org.apache.hive.service.cli.operation.GetFunctionsOperation.runInternal(GetFunctionsOperation.java:107)
        ... 13 more

Thanks
Shawn

Reply via email to