第十单元 完全分布式、Hive
2、Hive
Hive是数据仓库:
zhangsan math 99
lisi math 88
wangwu math 78
zhangsan english 69
lisi english 87
wangwu english 79
1、数据文件
2、对数据文件的表、字段等描述信息(元数据信息,默认使用derby存放元数据信息,建议使用Mysql存放元数据信息)
select avg(成绩) from 表名 group by name;
步骤:
1、解压hive
2、重命名配置文件,并修改文件/opt/apache-hive-1.2.2-bin/conf
mv hive-default.xml.template hive-site.xml
3、清空 echo >hive-site.xml
4、
javax.jdo.option.ConnectionURLname>
jdbc:mysql://hdp1:3306/hive?createDatabaseIfNotExist=truevalue>
property>
javax.jdo.option.ConnectionDriverNamename>
com.mysql.jdbc.Drivervalue>
property>
javax.jdo.option.ConnectionUserNamename>
rootvalue>
property>
javax.jdo.option.Connecti