Support Questions

Find answers, ask questions, and share your expertise

Ambari hive's "hive.aux.jars.path" configuration

avatar
Contributor

Hi.

I've found that with Ambari, hive.aux.jars.path configuration is very weird.

There are some problem.

1. custom hive-site configuration not working.

even though I add "hive.aux.jars.path" to hive-site configuration, it will ignored.

2. hive-env.sh template editing.

if I add this line to hive-env.sh template

 export HIVE_AUX_JARS_PATH="$HIVE_AUX_JARS_PATH,hdfs:///user/elasticsearch/elasticsearch-hadoop-2.3.0.jar"

Hive server executed wrong hive.aux.jars.path.

$ ps -ef|grep java | grep erver2
hive      25116      1  2 21:38 ?        00:00:26 /usr/jdk64/jdk1.8.0_60/bin/java -Xmx1024m -Dhdp ........ org.apache.hive.service.server.HiveServer2 --hiveconf hive.aux.jars.path=file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar ,file:// hdfs,file://///user/band_dev/elasticsearch/elasticsearch-hadoop-2.3.0.jar

I have tried many configuration but No lucky.

Why ambari make

hdfs:///user/elasticsearch/elasticsearch-hadoop-2.3.0.jar

to

file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar ,file:// hdfs,file://///user/band_dev/elasticsearch/elasticsearch-hadoop-2.3.0.jar

close up

  ,file:// hdfs,file://///user/b...

this might be 
 ,hdfs:///user/b...

If I can not use hive.aux.jar.path to hive-site configuration, at least I want hive-env.sh to work with hdfs locaiton.

If then I do not have to locate jar to every hive server(with HA configured).

Any Idea?

1 ACCEPTED SOLUTION

avatar
Master Guru

The settings are a bit weird. I never had luck getting the JAR_PATH settings correctly to work. What worked for me:

I always create an auxlib folder in the hive installation and put all jars I need in there. These are then available to the Server and the executed tez jobs.

I.e. as hive

mkdir /usr/hdp/<version>/hive/auxlib

and then just copy your jars in there.

You only need to add these jars to the Hiveserver location ( not all nodes ). If you use the old hive client you also need it on the client machines ( but you should use beeline anyhow )

View solution in original post

5 REPLIES 5

avatar
Master Guru

The settings are a bit weird. I never had luck getting the JAR_PATH settings correctly to work. What worked for me:

I always create an auxlib folder in the hive installation and put all jars I need in there. These are then available to the Server and the executed tez jobs.

I.e. as hive

mkdir /usr/hdp/<version>/hive/auxlib

and then just copy your jars in there.

You only need to add these jars to the Hiveserver location ( not all nodes ). If you use the old hive client you also need it on the client machines ( but you should use beeline anyhow )

avatar
Contributor

It works perfectly! thanks a lot.

avatar

Did you have to restart HiveServer2 to get the changes to take effect?

avatar
Guru

Hi, what version of Ambari are you running?

ambari-server --version

avatar
Contributor

Apache Ambari Version2.2.1.0 using!