1. Hive中操作
./bin/beeline
!connect jdbc:hive2://localhost:10000
root
rootdeve
CREATE TABLE hbase_table_hyy1(key int, c1_tinyint tinyint,c2_smallint smallint,c3_int int,c4_bigint bigint,c5_float float ,c6_double double,c7_string string,c8_binary binary,c9_timestamp timestamp, c10_decimal decimal,c11_char char(30),c12_varchar varchar(30),c13_date date)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,f1:c1,f1:c2,f1:c3,f1:c4,f1:c5,f1:c6,f1:c7,f1:c8,f1:c9,f1:c10,f1:c11,f1:c12,f1:c13")
TBLPROPERTIES ("hbase.table.name" = "hyy1", "hbase.mapred.output.outputtable" = "hyy1");
插入一条数据
insert into hbase_table_hyy1 values(5,2,32,800000,3398888222299