vishal
vishal

Reputation: 33

Hive quering on existing table in HBase

I've created table in HIVE using CREATE EXTERNAL TABLE command for existing table in HBase.

I'm able to see the table through HIVE shell

but while querying on the table through HIVE, returns '0' records. Through logs identified that HIVE is executing MAP-REDUCE program in HADOOP and not in HBase

Have I missed anything in configuring Hive and HBase ?

Upvotes: 1

Views: 1032

Answers (1)

Mark Grover
Mark Grover

Reputation: 4080

I am guessing you are using a version of Hive before 0.9.

Creating a Hive table with HBase storage handler on Hive 0.8 and before will only allow you to access data from your HBase table that was inserted via your corresponding Hive table. If you had any pre-existing data in your HBase table that wasn't inserted through the Hive table, you wouldn't be able to query it through the Hive table either.

Starting Hive 0.9, JIRA 1634, will be available which allows the Hive table to access all data present in the HBase table regardless of how it was inserted in it.

I suggest that you either get this patch or upgrade to Hive 0.9

Upvotes: 1

Related Questions