hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohammad Tariq <>
Subject Hive-Hbase integration
Date Sat, 17 Dec 2011 18:02:13 GMT
Hello list,

    I have a small demo table in Hbase and I want to operate it
through Hive.Here is my table in Hbase -

hbase(main):021:0> scan 'employee'
ROW                                    COLUMN+CELL
 emp1                                  column=address:,
timestamp=1324119715536, value=#12-bangalore
 emp1                                  column=name:,
timestamp=1324119698581, value=tariq
 emp1                                  column=no:,
timestamp=1324119688511, value=001
 emp2                                  column=address:,
timestamp=1324120893996, value=#13-bangalore
 emp2                                  column=name:,
timestamp=1324120883612, value=vishal
 emp2                                  column=no:,
timestamp=1324120866981, value=002
2 row(s) in 0.0260 seconds

I have 2 rows in the employee table, each corresponding to a
particular user. And I have 3 column families (each having only 1
column) - no, name and address.

For this table I have created an external table in Hive using the
following command -

hive> CREATE EXTERNAL TABLE employee(key string,no string,name
string,address string)    > STORED BY
  > WITH SERDEPROPERTIES ("hbase.columns.mapping" =
"no:,name:,address:")              > TBLPROPERTIES(""
= "employee");
But i am getting the following error -
FAILED: Error in metadata: java.lang.RuntimeException:
org.apache.hadoop.hive.hbase.HBaseSerDe: hbase column family 'no'
should be mapped to Map<String,?> but is mapped to string)FAILED:
Execution Error, return code 1 from
Could someone point out my mistake??Also, I would like to know whether
the field "key" corresponds to each row in the Hbase table i.e emp1
and emp2 or am I getting the concept wrong??I was going through the
wiki, but could not find the proper explanation there.Sorry if my
question seems childish.
Many thanks.
    Mohammad Tariq

View raw message