Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 01-14-2014 06:06 PM - edited 09-16-2022 01:52 AM
The "Using Hive with HBase", linked here, contains the following instructions:
To allow Hive scripts to use HBase, add the following statements to the top of each script. Replace the <component_version> strings with current version numbers for CDH, Guava and the Hive HBase handler.... ADD JAR /usr/lib/hive/lib/zookeeper.jar; ADD JAR /usr/lib/hive/lib/hive-hbase-handler-<Hive-HBase-Handler_version>-cdh<CDH_version>.jar ADD JAR /usr/lib/hive/lib/guava-<Guava_version>.jar; For example, ADD JAR /usr/lib/hive/lib/zookeeper.jar; ADD JAR /usr/lib/hive/lib/hive-hbase-handler-0.10.0-cdh4.4.0.jar ADD JAR /usr/lib/hive/lib/guava-11.0.2.jar;
However, when issuing a INSERT OVERWRITE TABLE hbase_table ... command in hive, I received the following error:
Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.mapreduce.TableInputFormatBase
This was fixed by adding the following jar in addition to the above jars:
ADD JAR /usr/lib/hive/lib/hbase.jar
And I think you should also point out the fact that people using Hive with HBase don't need to issue the ADD JAR command at the begining of every single script; all they need to do is edit the hive-site.xml file on each node they execute Hive from and include the following property:
<property> <name>hive.aux.jars.path</name> <value>file:///usr/lib/hive/lib/zookeeper.jar,file:///usr/lib/hive/lib/hive-hbase-handler-0.10.0-cdh4.5.0.jar,file:///usr/lib/hive/lib/guava-11.0.2.jar,file:///usr/lib/hive/lib/hbase.jar</value> </property>
Created 01-15-2014 09:00 AM
Thanks for the feedback, I will file a JIRA with our docs team to have this updated.
Much appreciated!
Created 01-15-2014 09:00 AM
Thanks for the feedback, I will file a JIRA with our docs team to have this updated.
Much appreciated!