hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tak-Lon (Stephen) Wu" <>
Subject Hive 1.0.0 reads HBase 0.94.x 's columns but empty
Date Thu, 09 Apr 2015 06:33:46 GMT

Sorry for the duplicated message (if any).

A brief overview of my environment, I am using Hive 1.0.0 and HBase
0.94.23, where HBase stores data as tables, and now I am trying to use Hive
(and metastore) to read existing data from HBase.

MY HBase table schema is :

Column Family: cf
RowKey: <a unique String included words>
column: <unique String 1 as qualifier>, value: null/empty
column: <unique String 2 as qualifier>, value: null/empty
column: <unique String N as qualifier>, value: null/empty

So, I create a Hive table and try to map all the columns to Hive's Map

CREATE EXTERNAL TABLE hiveTable(rowkey String, columns map<String,String>)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ('hbase.columns.mapping' = ':key, cf:')
TBLPROPERTIES('' = 'people-2012');

Finally, I try to read a single record by using the following Hive query

Select * FROM hiveTable where rowkey='John Denny';

The strange situation is that, no matter I read the entire table or just a
single record with specifying a existed rowkey, I got empty Map(s) like the
following result:

John Denny {}
Time taken: 20.61 seconds, Fetched: 1 row(s)

Only one out of 4 tables got non-empty Map columns (I have my own java
hbase scanner, I am sure the tables contains the some information for this
rowkey), does anyone know or have similar issue? I am wondering if a
wrong/old HBase causes this problem :(.


Stephen Wu
Pervasive Technology Institute
Indiana University, Bloomington

View raw message