Infinity
Infinity

Reputation: 683

Configuring Hive with Hbase

I need to execute queries on HBase using hive. I have downloaded the HBase and hive my HMaster is running fine; I need to know what configuration changes I need to do for hive to work with HBase as the back end database. Any link tutorial will be appreciated. Thanks in advance.

Upvotes: 2

Views: 7422

Answers (1)

Arnon Rotem-Gal-Oz
Arnon Rotem-Gal-Oz

Reputation: 25929

The apache Hive wiki explains it nicely https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration

To create an HBase table that is managed from hive try something like

CREATE TABLE hive_managed(key string, value1 string, value2 int)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,columnFamilyName:val1,columnFamilyName:val2")
TBLPROPERTIES ("hbase.table.name" = "hivemanaged");

*edited following comment

Upvotes: 7

Related Questions