可以用如下语句在hive上实行创表,然后hbase上会出现对应的表
此时可以看见basketball2已经在hbase上建立了 ps:CREATE TABLE basketball2(num int,team string,state string) STORED BY ‘org.apache.hadoop.hive.hbase.HBaseStorageHandler’ WITH SERDEPROPERTIES (“hbase.columns.mapping” = “:key,player:team,player:state”) TBLPROPERTIES (“hbase.table.name” = “basketball2”); create table后面跟hive上要创建的表名,mapping相当于映射,:前面没有东西就相当于是hbase里的rowkey,后面的player相当于列族里的Column family,而team和state相当于Column qualifier,可以desc查看:
可以见得player为列族名