Hadoop 未在配置单元中创建存储桶

Hadoop 未在配置单元中创建存储桶,hadoop,hive,hadoop-partitioning,Hadoop,Hive,Hadoop Partitioning,看看剧本, 配置单元存储桶未在分区表之后创建 step 1. create table orders_bucket9 (order_id int,order_date string,order_customer_id int,order_status string) partitioned by (order_month string) clustered by (order_status) into 4 buckets row format delimited fields termina

看看剧本, 配置单元存储桶未在分区表之后创建

step 1.
create table orders_bucket9
(order_id int,order_date string,order_customer_id int,order_status string) 
partitioned by (order_month string) 
clustered by (order_status) into 4 buckets
row format delimited
fields terminated by ',';

step 2.
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.exec.dynamic.partition=true;
set hive.enforce.buckting=true;
step 3.
insert into table orders_bucket9 partition(order_month) select                order_id,order_date,order_customer_id,order_status,substr(order_date,1,7) order_month from orders;

当我根据订单对表进行分区时,分区正在创建,但Bucking没有创建???

您能检查“描述格式化”时显示的输出吗您可以找出在哪个列上进行了bucketing和分区。order_month上只显示分区…Varun:Bucket信息显示在Bucket Columns行中。我执行了您的查询,发现bucketing是在[order_status]列上完成的。Deepan:当我从insert命令加载数据时,hdfs位置的Bucket并没有创建所有数据,而是在order_月加载不同的分区表集,而不是Bucket???