Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Please see the Cloudera blog for information on the Cloudera Response to CVE-2021-4428

hive to hbase mapping with avro - issue

Explorer

I created the hive to hbase mapping with avro based on :

https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration#HBaseIntegration-AvroDataStoredinH...

hbase(main):002:0> scan "menw:test2"

ROW COLUMN+CELL

defaultrewcrwxd-1549-4177-86 column=me_data:pCol, timestamp=1546545400898, value=.reanda42398fsdjsfd432098\rwefds. rwe-rwerewhjsfd 2018-12-28-15.24.29.896\x08SUCC\x1rwejsfdasfd432f\x02e\x00\x06dfs\x00\x00

defaultrewcxnbz-1649-4188-86 column=me_data:pCol, timestamp=1546544320898, value=.reanda45398ffdssfd432098\rwbfds. rwe-rwerewhjsfd 2018-12-28-15.24.29.896\x08SUCC\x1rwsdffdasfd432f\x02e\x00\x06dfs\x00\x00

hive> CREATE EXTERNAL TABLE test_hbase_avro

> ROW FORMAT SERDE 'org.apache.hadoop.hive.hbase.HBaseSerDe'

> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'

> WITH SERDEPROPERTIES (

> "hbase.columns.mapping" = ":key,me_data:id",

> "me_data.id.serialization.type" = "avro",

> "me_data.id.avro.schema.url" = "hdfs://host:8020/tmp/avroschemas-new/table.json")

> TBLPROPERTIES ( > "hbase.table.name" = "menw:test2",

> "hbase.mapred.output.outputtable" = "menw:test2",

> "hbase.struct.autogenerate"="true");

OK Time taken: 1.352 seconds

But select from the table failed with below error :

hive> select * from test_hbase_avro; OK Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: Error evaluating medata_pcol Time taken: 0.214 seconds

Appreciate any insights to resolve the issue.

0 REPLIES 0