文章目录
一,介绍Hive
1.1 Hive 语法
- 创建
crete database/schema, table, view, function, index
- 删除
drop database/schema, table, view, index;
- 清空
truncate table;
- 修改
alter database/schema, table, view;
- 修复表, 分区
- 显示
show database, view, table, index, columns;
- 创建外部表
create external table (名字 数据类型)
row format delimited fields terminated by '\054'
stored as textfile location '<hdfs_location>'
- 建立区表
create table 表名(名字 数据类型)
comment '' partitioned by
hive 是数据仓库,依赖hdfs作为数据的分布式部署,把sql转化为MR任务执行
提供hive shell
webUI
基于jdbc协议,启动hiveserver2,通过jdbc协议访问hive, 支持高并发