In order to add it permanently recommended ways are as follows.
1.
add in hive-site.xml
hive.aux.jars.path
file://localpath/yourjar.jar
2.
Copy and paste the JAR file to the ${HIVE_HOME}/auxlib/ folder (create
it if it does not exist).
Source: Apache hive essentials b
Hive doesn't currently handle storing of the JARs. Doing ADD JAR only adds the
jars to the current session, but won't help for other sessions.
The permanent functions syntax allows you to specify JAR paths when you create
the function. These should be on HDFS or other non-local path.
create fu