hbase與hive整合
1. hive中有數據 --> 創建hive管理表映射hbase
例如:
1)hive創建內部表
create table course.hbase_score(id int,cname string,score int)
stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
with serdeproperties("hbase.columns.mapping" = "cf:name,cf:score")
tblproperties("hbase.table.name" = "hbase_score");
2)插入數據
insert overwrite table course.hbase_score select id,cname,score from course.score;
2. habse中有數據 --> 創建hive外部表映射hbase
例如:
CREATE external TABLE course.hbase2hive(id int, name string, score int)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:name,cf:score")
TBLPROPERTIES("hbase.table.name" ="hbase_hive_score");
hbase與sqoop整合
1.