如何在HiveThriftServer2中注册自定义的UDF jar? [英] How to register custom UDF jar in HiveThriftServer2?
问题描述
在HiveThriftServer2类中,调用 startWithContext 与调用 main ?
我有一个客户UDF jar,我想要注册,所以每次当thrift服务器启动时,所有这些都是自动配置。有没有办法做到这一点?
我可以使用Hive上下文来注册UDF jar和函数,并调用HiveThriftServer2.startWithContext来启动服务器吗?
谢谢
您正在寻找的是 hive.aux.jars.path
,它是一个Hive属性,不是Spark特定的。
我个人还没有尝试过,但我在想这样的事情
./ sbin / start-thriftserver.sh \
--hiveconf hive.aux.jars.path = file:///opt/lib/custom-udfs.jar
参考资料
In HiveThriftServer2 class, what is the difference between calling the startWithContext vs calling the main?
I have a customer UDF jar that I want to register, so that every time when the thrift server boots up, all these are auto configure. Is there a way to do this?
Can I use Hive context to register the UDF jar and functions and call the HiveThriftServer2.startWithContext to start up the server?
Thanks
What you are looking for is called hive.aux.jars.path
, and it's a Hive property, not Spark specific.
I personally haven't tried it, but I'm thinking something like this
./sbin/start-thriftserver.sh \
--hiveconf hive.aux.jars.path=file:///opt/lib/custom-udfs.jar
References
这篇关于如何在HiveThriftServer2中注册自定义的UDF jar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!