Hive:动态分区

时间:2016-03-30 05:51:05

标签: hadoop hive hiveql

尝试在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; 

错误:

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

我在地图任务和70%的reduce任务完成后收到此错误。 在这种情况下如何处理的任何帮助....?

此致

1 个答案:

答案 0 :(得分:0)

请尝试以下设置:


SET hive.exec.dynamic.partition = true
如果表只有动态分区列,则配置设置hive.exec.dynamic.partition.mode应设置为非严格模式:
SET hive.exec.dynamic.partition.mode = non-strict;