Put your JAR file ahead of HADDOP in CLASSPATH in your shell startup file
unset CLASSPATH CLASSPATH=.:MYLIBRARY:$HADOOP_HOME/share/hadoop/common/hadoop-common-2.6.0- .. Or Rename version 3.1 under HADOOP_HOME\lib to something else, ensuring that is no longer in the CLASSPATH echo $CLASSPATH HTH, Mich Talebzadeh Sybase ASE 15 Gold Medal Award 2008 A Winning Strategy: Running the most Critical Financial Data on ASE 15 <http://login.sybase.com/files/Product_Overviews/ASE-Winning-Strategy-091908.pdf> http://login.sybase.com/files/Product_Overviews/ASE-Winning-Strategy-091908.pdf Author of the books "A Practitioner’s Guide to Upgrading to Sybase ASE 15", ISBN 978-0-9563693-0-7. co-author "Sybase Transact SQL Guidelines Best Practices", ISBN 978-0-9759693-0-4 Publications due shortly: Complex Event Processing in Heterogeneous Environments, ISBN: 978-0-9563693-3-8 Oracle and Sybase, Concepts and Contrasts, ISBN: 978-0-9563693-1-4, volume one out shortly <http://talebzadehmich.wordpress.com/> http://talebzadehmich.wordpress.com NOTE: The information in this email is proprietary and confidential. This message is for the designated recipient only, if you are not the intended recipient, you should destroy it immediately. Any information in this message shall not be understood as given or endorsed by Peridale Technology Ltd, its subsidiaries or their employees, unless expressly so stated. It is the responsibility of the recipient to ensure that this email is virus free, therefore neither Peridale Ltd, its subsidiaries nor their employees accept any responsibility. From: Akansha Jain [mailto:[email protected]] Sent: 04 September 2015 22:59 To: [email protected] Subject: Adding JAR in Hive classpath Hi All, I am facing an issue with the Hive classpath. I have written a UDAF which is using common maths 3.3 version. So, while creating temporary function I first add common maths 3.3 and then UDAF jar and create temporary function. There is another version of common math 3.1 present under HADOOP_HOME/lib directory. Now the problem is even after adding common maths 3.3 in Hive classpath (by ADD JAR ..) , Hive is picking common maths 3.1 version from HADOOP_HOME/lib folder. How do I remove 3.1 version from classpath. I tried using DELETE JAR ... but it doesnt work. Is there any way, I can force Hive to pick my version and not the one with Hadoop lib. Any help is appreciated. Thanks AJ
