Support Questions

Find answers, ask questions, and share your expertise

Adding hive auxiliary jar files

Hi,

In HIVE CLI we can directly add jar files to their session but in Beeline we need to have admin permissions to add the jar file to the session as we are using SQL Standard Based Hive Authorization.

1. What is the best way to grant privileges to Beeline users in order for them to add jars/files? We don't want to grant admin privileges to all beeline users.

2. Is there any best practices in regarding the use of adding jars from beeline?

Thanks in advance.

1 ACCEPTED SOLUTION

Super Guru

@Sri Bandaru you can add the jars in hive.aux.jars.path=/path/to/jar

to add them to global location. then you don't need admin access.

View solution in original post

7 REPLIES 7

Super Guru

@Sri Bandaru you can add the jars in hive.aux.jars.path=/path/to/jar

to add them to global location. then you don't need admin access.

@Sunile Manjee

Thanks for the quick response. Is this the correct way?

mkdir /usr/hdp/current/hive-server2/auxlib/

copy required jars to /usr/hdp/current/hive-server2/auxlib/ loaction.

Added below property to hive-site.xml

<property>
  <name>hive.aux.jars.path</name>
  <value>/usr/hdp/current/hive-server2/auxlib/</value>
</property>

Super Guru

@Sri Bandaru yes and then put your jars in that directory.

@Sunile Manjee

Okay, Even after setting this property, still do I need to register jar files? Because I'm getting the same error even after setting the property.

Super Guru

@Sri Bandaru add your jars to .hiverc file.

@Sunile Manjee

What's the best way to give

hive.aux.jars.path=/path/to/jar
hive.aux.jars.path=file:///path/to/jar

If I give /path/to/jar will it check for hdfs or local filesystem?

Hhi @smanjee hi @Sridhar Reddy

I try to add the phoenix-hive.jar to hive permanently and general available for external applications but I don't know exactly how to do that with ambari.

I set the hive.aux.jars.path property in cusmto hive-site in abari to a location in hdfs to centrally reach the jars but it is not working.

If I create a auxlib folder in a node, then it works but only for this node.

Any comment will be appreciated.

Kind regards,

Paul