简体   繁体   中英

Hive: Dynamic Partition

Getting the following error when tried to execute the following code for dynamic partitioning in hive.

Hive Query:

CREATE EXTERNAL TABLE VODPARTITION(EVENT_ID string, EVENT_TYPE string, DATE string) 
PARTITIONED BY (IPADDRESS string) 
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' stored as sequencefile;

 INSERT OVERWRITE TABLE VODPARTITION
 PARTITION(ipaddress) 
 SELECT EVENT_ID, EVENT_TYPE, DATE, t.IP_ADDRESS as ipaddress FROM VOD t; 

Error:

FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 

I am getting this error after map task and 70% of reduce task is completed. Any help on how to proceed in this case....?

Regards

Please try with below settings:


SET hive.exec.dynamic.partition=true
If the table has only dynamic partition columns, then the configuration setting hive.exec.dynamic.partition.mode should be set to non-strict mode:
SET hive.exec.dynamic.partition.mode=non-strict;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM