如何在HiveThriftServer2中注册自定义的UDF jar? [英] How to register custom UDF jar in HiveThriftServer2?

查看:309
本文介绍了如何在HiveThriftServer2中注册自定义的UDF jar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆