Hive中添加自定义udf udaf udtf等函数的jar文件的三种方法

在开发了hive的udf udaf udtf函数的jar文件后,需要将jar文件放入hive的环境中才可以使用。可以通过以下三种方法加入:

1. 使用add jar path/test.jar;方法加入

该方法的缺点是每次启动Hive的时候都要从新加入,退出hive就会失效。

2. 通过设置hive的配置文件hive-site.xml 加入

在配置文件中增加配置

hive.aux.jars.path
file:///jarpath/all_new1.jar,file:///jarpath/all_new2.jar

保存即可。

该方法比第一种方法方便很多。不需要每次启动Hive执行命令加入,只是配置稍微复杂一些。

3. 在${HIVE_HOME}中创建文件夹auxlib ,然后将自定义jar文件放入该文件夹中。

个人推荐这种方法,方便快捷。

9 Responses so far.

  1. These are genuinely impressive ideas in concerning blogging.

    You have touched some fastidious points here. Any way keep up wrinting.

  2. Stunning quest there. What happened after? Thanks!
  3. Hi there, I check your blogs on a regular
    basis. Your story-telling style is awesome, keep up the
    good work!
  4. Very soon this website will be famous among all blogging
    users, due to it’s good posts
  5. big dildos says:
    Say, you got a nice blog.Thanks Again. Awesome.
  6. group sex says:
    Thanks for sharing, this is a fantastic article.Really thank you! Much obliged.
  7. Ariel Bickes says:
    You have brought up a very wonderful points, appreciate it for the post.
  8. tee shirts says:
    Im grateful for the blog article.Thanks Again. Keep writing.
  9. Google says:
    Google

    Check beneath, are some absolutely unrelated internet websites to ours, on the other hand, they are most trustworthy sources that we use.

Leave a Reply to big dildos Cancel reply