Is there any way I can add hive jars permanently instead of adding at session level in hive shell?
Any help would be appreciated
Is there any way I can add hive jars permanently instead of adding at session level in hive shell?
Any help would be appreciated
these can be done by two steps
{hadoop-env.sh should be update with CLASSPATH of hive and other location for user defined custom jars and common location which available in entire cluster }
You also need to restart the hive/hadoop to take effect if after changes it dnt work.
You will have to put the jar in the lib folder of hadoop or hive in all your nodes.
In the hiveserver2 host, create a location something like /var/lib/hive and add all the necessary jars inside that folder. Edit the hive-site.xml and mention all these jars in the property hive.aux.jars.path
Eg:
ADD JAR /home/amal/hive/amaludf.jar ADD JAR /home/amal/hive/amaludf2.jar
Instead of using the above commands in each session, you can define it for all sessions.
Create a location for storing these jars in the hiveserver host.
Add all these jars to that directory
Set the property in hive-site.xml
Restart the hiveserver2 after doing this modification.
Instead of creating a directory and putting all the jars, you can specify paths of individual jars also. The only condition is that all these jars should be present in the hiveserver host.
Eg: