We installed HDP 188.8.131.52-258 on cluster of 7 nodes, using Ambari 184.108.40.206 on Google cloud machines.
(Hive and HBase are on different hosts)
In our java application when we try to create external table in Hive, we got the following error:
org.apache.hive.service.cli.HiveSQLException: java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/client/Connection
Does any one know, what could be the cause of this issue?
create external table PRODUCTS(key string, PRODUCT_ID DOUBLE, PRODUCT_NAME STRING, LIST_PRICE DOUBLE, PRODUCT_SIZE STRING, CATALOG_URL STRING, PRODUCT_DESCRIPTION STRING, LAST_UPDATE STRING) stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' with serdeproperties ('hbase.columns.mapping' = ':key,PRODUCTS:PRODUCT_ID#b,PRODUCTS:PRODUCT_NAME,PRODUCTS:LIST_PRICE#b,PRODUCTS:PRODUCT_SIZE,PRODUCTS:CATALOG_URL,PRODUCTS:PRODUCT_DESCRIPTION,PRODUCTS:LAST_UPDATE') tblproperties ('hbase.table.name' = 'default:PRODUCTS')
You need HBase client jars for the right version on your client machine where you run this query from. do you have hbase-env.sh on your client machine where you are running this query from? Is HBase_HOME in the classpath?
On your machine you are running Hive, you need to add hbase jar file to your class path. You also want to make sure that "hbase-site.xml" is the classpath on your machine where you are running hive.