关闭

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

198人阅读 评论(0) 收藏 举报
分类:
  • 运行代码
LOAD DATA LOCAL INPATH '/data/L.D.Xiao/allmac.txt' OVERWRITE INTO TABLE tag_model.abtesttable PARTITION (p_log_date='2017-01-01');
  • 报错
Failed with exception Wrong file format. Please check the file's format.
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask
  • 原因
hive> show create table abtesttable;
CREATE  TABLE `abtesttable`(
  `mac` string, 
  `type` string)
COMMENT 'ABTest mac list of the recommend system'
PARTITIONED BY ( 
  `p_log_date` string)
ROW FORMAT DELIMITED 
  FIELDS TERMINATED BY '\t' 
STORED AS INPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.RCFileInputFormat' 
OUTPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.RCFileOutputFormat'
LOCATION
 'hdfs://hadoop03.chcloud.com:8020/warehouse/tag_model.db/abtesttable'
TBLPROPERTIES (
  'transient_lastDdlTime'='1482994280')
  • 解决办法
CREATE  TABLE `abtesttable_test`(
  `mac` string, 
  `type` string)
COMMENT 'ABTest mac list of CHiQ3 recommend system'
PARTITIONED BY ( 
  `p_log_date` string)
ROW FORMAT DELIMITED 
  FIELDS TERMINATED BY '\t' 
STORED AS textfile;

 LOAD DATA LOCAL INPATH '/data/xinting.xiao/allmac.txt' OVERWRITE INTO TABLE tag_model.abtesttable_test PARTITION (p_log_date='2017-01-01');
  • 注意
insert overwrite table tag_model.abtesttable_test partition (p_log_date) select * from tag_model.abtesttable;
(若用:
insert into table tag_model.abtesttable_test partition (p_log_date) select * from tag_model.abtesttable;
则依旧会报错:
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
)
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场