今天在用客户端执行hive的时候服务端总是报找不到jar包找不到类,很纳闷,发现在hive-env.sh中已经加入了这个jar包,在命令行中执行hive时是可以成功的,但是在客户端执行却总是报错,纳闷,后来去hive官方配置文档中看才发现原来是在hive-site.xml中没有配置jar包
官方文档查看方式:http://hive.apache.org/--->点击Hive wiki(进来后往下翻看到User Documentation)--->Hive Configuration Properties
官方文档中如下说
hive.aux.jars.path
- Default Value: (empty)
- Added In: Hive 0.2.0 or earlier
The location of the plugin jars that contain implementations of user defined functions (UDFs) and SerDes.
大概就是说插件与自定义函数存放的地方看完文档做如下配置
<property>
<name>hive.aux.jars.path</name>
<value>file:///Users/apps/hive-0.13.0-bin/lib/hive-json-serde-0.2.jar
</value>
</property>
配置完后发现成功了,注意,hive.aux.jars.path只能一个一个文件加进去,不能配置文件夹或者.*jar