Hive 分区
2016-05-10 08:28
253 查看
1. 建立多个表,每个表导入不同的数据
create table test_1 (id int);
create table test_2 (id int);
create
table test_3 (id int);
............
2.
创建分区表
create table test(id int) partitioned by (name sting);
alter table test add partition (name = '1')
alter table test add partition (name = '2')
切忌分区过多, namenode 压力太大
3. 分区数目太多可以考虑分桶
create table test(id int, name string) partitioned by (age int) clustered by (id) into 96 buckets;
create table test_1 (id int);
create table test_2 (id int);
create
table test_3 (id int);
............
2.
创建分区表
create table test(id int) partitioned by (name sting);
alter table test add partition (name = '1')
alter table test add partition (name = '2')
切忌分区过多, namenode 压力太大
3. 分区数目太多可以考虑分桶
create table test(id int, name string) partitioned by (age int) clustered by (id) into 96 buckets;
相关文章推荐
- HiveQL 查询
- 天气预报
- OAuth2.0原理与简单实现演示
- HDU 5658 CA Loves Palindromic(回文树)
- Linux入门使用-3
- HDU 5658 CA Loves Palindromic(回文树)
- [C#]关键字
- MySql数据库之引擎
- 删除线
- Ubuntu Cannot run program "../SDK/build-tools/xxx/aapt": erro = 2 No such file or directory
- Java WebService 简单实例
- BZOJ4382: [POI2015]Podział naszyjnika
- wc
- Oracle 横表变纵表
- Quickly place a window to another screen using only the keyboard
- Startservice的生命周期
- 锚的神秘面纱
- 【BZOJ-4514】数字配对 最大费用最大流 + 质因数分解 + 二分图 + 贪心 + 线性筛
- URAL 2040 Palindromes and Super Abilities 2(回文树)
- bzoj 3280: 小R的烦恼(费用流)