FAQ
Hi Percy,

Seems like Hive allows you to specify "hbase.table.default.storage.type" in
either TBLPROPERTIES or SERDEPROPERTIES.

Right now for Impala, "hbase.table.default.storage.type" must be specified
in the TBLPROPERTIES.

I've filed
https://issues.cloudera.org/browse/IMPALA-882
to track this.

Thanks,
Alan

On Thu, Mar 13, 2014 at 11:40 AM, Percy Zhao wrote:

I created an external hive table that points to a hbase table like this:
create external table percy(
ts string,
dd string,
type string,
traffic_type string,
media_id string,
adspace_id string,
seat_id string,
creative_id string,
price bigint,
adcall bigint,
bidrequest bigint,
adnetwork bigint,
service bigint,
click bigint,
callback bigint,
impression bigint
)
stored by "org.apache.hadoop.hive.hbase.HBaseStorageHandler"
with SERDEPROPERTIES(
"hbase.table.default.storage.type"="binary",
"hbase.columns.mapping" =
":key,metrics:ts,metrics:type,metrics:traffic_type,metrics:media_id,metrics:adspace_id,metrics:seat_id,metrics:creative_id,

metrics:price,metrics:adcall,metrics:bidrequest,metrics:adnetwork,metrics:service,metrics:click,metrics:callback,metrics:impression"
)
TBLPROPERTIES("hbase.table.name" = "ssp");

according to some posts online, i need to set the storage type to binary
in order to read the binary fields.

then i use hbase incr to bump up some values:
hbase(main):015:0> incr 'percy', 'row1', 'metrics:impression', 3

scan the record in hbase shell with the following return:
hbase(main):019:0> get 'percy', 'row1'
COLUMN CELL



metrics:impression
timestamp=1394734271572, value=\x00\x00\x00\x00\x00\x00\x00\x03


from hive i can select this record with the correct value of 3 on the
impression field. however, issuing the same query in impala generates the
following error:
ERRORS ENCOUNTERED DURING EXECUTION:
Backend 0:Error converting column metrics:impression: '' TO BIGINT

Thanks,
Percy





To unsubscribe from this group and stop receiving emails from it, send an
email to impala-user+unsubscribe@cloudera.org.
To unsubscribe from this group and stop receiving emails from it, send an email to impala-user+unsubscribe@cloudera.org.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
groupimpala-user @
categorieshadoop
postedMar 13, '14 at 6:40p
activeMar 13, '14 at 10:36p
posts3
users2
websitecloudera.com
irc#hadoop

2 users in discussion

Percy Zhao: 2 posts Alan Choi: 1 post

People

Translate

site design / logo © 2022 Grokbase