set hive.exec.dynamic.partition.mode=nonstrict;
set hive.exec.max.dynamic.partitions.pernode=1000;
set hive.hadoop.supports.splittable.combineinputformat=false;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
insert into table seed partition (p)
select i,i
from (select 1) x lateral view posexplode (split (space (999),' ')) e as i,x
1条答案
按热度按时间z4iuyo4d1#
创建分区种子表
用序号在0到999之间的1k条记录填充种子表。
每个记录都被插入到不同的分区中,因此位于不同的hdfs目录中,更重要的是位于不同的文件中。
附笔。
需要以下集合
生成包含1g记录的表。
种子表中的每个1k记录都位于不同的文件中,并且由不同的容器读取。
每个容器生成1百万条记录。