解决hive集成hbase Bytes.toByte处理字段 隐射为null乱码 为0问题
错误例子(一)
create external table bigdata_student(
id string,
name string,
age int
)stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
with SERDEPROPERTIES ("hbase.columns.mapping"=":key,info:name,msg:age")
tblproperties ("hbase.table.name"="bigdata:student");
错误例子(二)
create external table bigdata_student(
id string,
name string,
age int
)stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
with SERDEPROPERTIES ("hbase.columns.mapping"=":key,info:name,msg:age#b")
tblproperties ("hbase.table.name"="bigdata:student");
正确例子
external table bigdata_student(
id string,
name string,
age bigint
)stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
with SERDEPROPERTIES ("hbase.columns.mapping"=":key,info:name,msg:age#b")
tblproperties ("hbase.table.name"="bigdata:student");