0

I am writing a simple adapter that reads data from hive server and send it to my application. This adapter should run on all hive distributions(Horwonworks,Cloudera,MapR and others), so I need to add the local machine(with installed hive client) hive-jdbc standalone jar path to the classpath when running the adapter(along with some hadoop jars it seems), because I don't want to pack the jars along with my application to prevent client server version mismatch.

My question: How can I find the hive-jdbc standalone jar in the hive client location that will work on all the distributions? Is there an enviorment varialbe set to the hive libs location, and if so how can i set it?

Thanks

Jonathan
  • 31
  • 6
  • What if that "local machine" has no Hadoop libs installed? Or worse, several versions, with a symlink pointing to the "current" version? What if the machine has just the core Hadoop libs but not the Hive libs *(e.g. you are running inside a YARN container)*? – Samson Scharfrichter Jul 16 '17 at 14:08
  • On the other hand, if you package the JDBC driver inside your client app, then you must be careful that the driver version is not more recent than the server, otherwise you may hit a protocol compatibility issue. – Samson Scharfrichter Jul 16 '17 at 14:12
  • Do you expect to support Kerberos authentification? It would add another layer of complexity (and yet another layer for Kerberos from a Windows client). Cf. my answers to https://stackoverflow.com/questions/36005061/where-is-apache-hive-jdbc-driver-for-download and https://stackoverflow.com/questions/39362326/connect-to-kerberised-hive-using-jdbc-from-remote-windows-system – Samson Scharfrichter Jul 16 '17 at 14:14
  • As edited, I do not want to pack the jars in my main jar, I want to run a simple script that adds the hive-jdbc jar to my CLASSPATH, and will work on all distribution. I am fine that it would work with the installed hive associated with the hive/hadoop command. – Jonathan Jul 16 '17 at 14:26

0 Answers0