In hbase I have a table called 'Data'. A snippet of the data looks like:
ROW COLUMN+CELL
001 column=R2:data, timestamp=1484695502280, value=key1$^valueA^^key2$^valueB^^key3$^valueC
002 column=R2:data, timestamp=1484695503481, value=key1$^valueX^^key2$^valueY^^key3$^valueZ
We use unique character delimeters for the field and map keys due to spaces, commas, and tabs being present in the actual data.
In Hive I would like to create an external table against the hbase 'Data' table. And then create a view on the external table to display the key/value information.
I've been doing some research and believe that MultiDelimitSerDe may be something that I may be able to use. However, I am running into issues.
My external table is defined as:
CREATE EXTERNAL TABLE Test(key String, sessionInfo map<String, String>)
ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe'
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,R2:data",
"field.delim"="^^",
"mapkey.delim"="$")
TBLPROPERTIES ('hbase.table.name' = 'Data');
However, when I perform the following query:
select * from Test;
I get the following error:
Error: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: class org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe: expects either BytesWritable or Text object! (state=,code=0)
I am a little confused to what the error is referring to, so any help would be appreciated.
Thank you.