Support Questions

Find answers, ask questions, and share your expertise

Hi, I am using HDP 2.6. I am unable to create Hive External table for HBase. I always get an error saying FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.hbase.HbaseStorageHandler'

avatar
Contributor

FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.hbase.HbaseStorageHandl

1 ACCEPTED SOLUTION

avatar

You need to use org.apache.hadoop.hive.hbase.HBaseStorageHandler.

Please see if that helps.

View solution in original post

3 REPLIES 3

avatar

You need to use org.apache.hadoop.hive.hbase.HBaseStorageHandler.

Please see if that helps.

avatar

avatar
Rising Star

You should add hive-hbase-handler.jar in hive shell or hive-conf.

Connect Hive Shell

Execute these commands.

ADD JAR /usr/hdp/2.5.3.0-37/hive/lib/hive-hbase-handler.jar;

CREATE TABLE hbase_table_1(tags map<string,int>, row_key string)

STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'

WITH SERDEPROPERTIES ( "hbase.columns.mapping" = "cf:tag_.*,:key", "hbase.columns.mapping.prefix.hide" = "true" );

Then you'll find created table in hbase shell.