### 这个地方一定要注意大小写,字母巨多,任何一个大小写错了都不会成功,仔细检查
hive> create table hive_student(id int, name string)> stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'> with serdeproperties ("hbase.columns.mapping"=":key,cf1:name")> tblproperties("hbase.table.name"="hive_student");
OK
Time taken: 2.441 seconds
###新开一个窗口,进入Hbase Shell查看创建的表
Hbase
hbase:001:0> list
TABLE
hive_student
t1
2 row(s)
Took 0.2752 seconds
=>["hive_student", "t1"]
### Hive插入数据操作
Hive
hive> insert into hive_student values(1,'zhangsan');
Query ID = root_20241123090913_ffb6149b-0225-4d95-ad7c-39747ab9dc9e
Total jobs=1
Launching Job 1 out of 1
Number of reduce tasks is set to 0 since there's no reduce operator
Starting Job = job_1732322224947_0001, Tracking URL = http://master:8088/proxy/application_1732322224947_0001/
Kill Command = /opt/hadoop/bin/mapred job -kill job_1732322224947_0001
Hadoop job information for Stage-2: number of mappers: 1; number of reducers: 02024-11-23 09:09:28,089 Stage-2 map =0%, reduce =0%
2024-11-23 09:09:36,398 Stage-2 map =100%, reduce =0%, Cumulative CPU 3.33 sec
MapReduce Total cumulative CPU time: 3 seconds 330 msec
Ended Job = job_1732322224947_0001
MapReduce Jobs Launched:
Stage-Stage-2: Map: 1 Cumulative CPU: 3.33 sec HDFS Read: 13150 HDFS Write: 0 SUCCESS
Total MapReduce CPU Time Spent: 3 seconds 330 msec
OK
Time taken: 24.734 seconds