hive join测试
来源:互联网 发布:防蹭网软件 编辑:程序博客网 时间:2024/05/18 08:20
hive> create table course(id int,c1 string,c2 string,c3 string,c4 string)row format delimited fields terminated by ' ';OKTime taken: 0.07 secondshive> create table student(id int,name string,age int)row format delimited fields terminated by ' ';OKTime taken: 0.039 secondshive> show tables;OKcoursestudenttianqiTime taken: 0.016 seconds, Fetched: 3 row(s)hive> describe student;OKid int None name string None age int None Time taken: 0.048 seconds, Fetched: 3 row(s)hive> load data local inpath '/home/jifeng/hadoop/course.txt' into table course;Copying data from file:/home/jifeng/hadoop/course.txtCopying file: file:/home/jifeng/hadoop/course.txtLoading data to table test.courseTable test.course stats: [num_partitions: 0, num_files: 1, num_rows: 0, total_size: 121, raw_data_size: 0]OKTime taken: 0.183 secondshive> select * from coures;FAILED: SemanticException [Error 10001]: Line 1:14 Table not found 'coures'hive> select * from course;OK1 英语 中文 法文 日文2 中文 法文3 中文 法文 日文4 中文 法文 拉丁5 中文 法文 德文Time taken: 0.063 seconds, Fetched: 5 row(s)hive> load data local inpath '/home/jifeng/hadoop/stu.txt' into table student;Copying data from file:/home/jifeng/hadoop/stu.txtCopying file: file:/home/jifeng/hadoop/stu.txtLoading data to table test.studentTable test.student stats: [num_partitions: 0, num_files: 1, num_rows: 0, total_size: 57, raw_data_size: 0]OKTime taken: 0.135 secondshive> select * from student;OK1 nick 242 doping 253 caizhi 264 liaozhi 275 wind 30Time taken: 0.043 seconds, Fetched: 5 row(s)hive> select s.name,c.c1,c.c2,c.c3,c.c4 from student s join course c on s.id = c.id;Total MapReduce jobs = 1Launching Job 1 out of 1Number of reduce tasks not specified. Estimated from input data size: 1In order to change the average load for a reducer (in bytes): set hive.exec.reducers.bytes.per.reducer=<number>In order to limit the maximum number of reducers: set hive.exec.reducers.max=<number>In order to set a constant number of reducers: set mapred.reduce.tasks=<number>Starting Job = job_201408190908_0002, Tracking URL = http://jifeng01:50030/jobdetails.jsp?jobid=job_201408190908_0002Kill Command = /home/jifeng/hadoop/hadoop-1.2.1/libexec/../bin/hadoop job -kill job_201408190908_0002Hadoop job information for Stage-1: number of mappers: 2; number of reducers: 12014-08-19 16:25:08,848 Stage-1 map = 0%, reduce = 0%2014-08-19 16:25:10,857 Stage-1 map = 50%, reduce = 0%, Cumulative CPU 0.46 sec2014-08-19 16:25:11,864 Stage-1 map = 50%, reduce = 0%, Cumulative CPU 0.46 sec2014-08-19 16:25:12,870 Stage-1 map = 50%, reduce = 0%, Cumulative CPU 0.46 sec2014-08-19 16:25:13,876 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.25 sec2014-08-19 16:25:14,880 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.25 sec2014-08-19 16:25:15,887 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.25 sec2014-08-19 16:25:16,892 Stage-1 map = 100%, reduce = 33%, Cumulative CPU 1.25 sec2014-08-19 16:25:17,900 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 1.8 sec2014-08-19 16:25:18,907 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 1.8 secMapReduce Total cumulative CPU time: 1 seconds 800 msecEnded Job = job_201408190908_0002MapReduce Jobs Launched: Job 0: Map: 2 Reduce: 1 Cumulative CPU: 1.8 sec HDFS Read: 616 HDFS Write: 142 SUCCESSTotal MapReduce CPU Time Spent: 1 seconds 800 msecOKnick 英语 中文 法文 日文doping 中文 法文caizhi 中文 法文 日文liaozhi 中文 法文 拉丁wind 中文 法文 德文Time taken: 13.549 seconds, Fetched: 5 row(s)hive>
0 0
- hive join测试
- hive join
- hive join
- hive join
- hive join
- hive join
- hive join
- hive join
- hive join
- 【HIVE】join
- hive join
- Hive Join
- hive join
- Hive Join
- hive join
- HIVE JOIN
- hive--join
- hive join
- 芯片手册尺寸标注
- linux下ns2下载、安装与环境…
- 基于ATMEG8AVR单片机的频率…
- 为什么双绞线绞合可以减少相…
- ISP和JTAG
- hive join测试
- STC和ATMEL
- 曼彻斯特编码
- ibM P server 看面板 上的 HMC 的IP ,一定要回复到 N 状态,否则会down 机器
- RJ45
- IIC总线
- 51单片机程序存储器和数据存…
- SQL Server数据库查看数据库用户权限
- TTL电平和CMOS电平