伴随着梦想前行
27/4
2018

hive1.2报错MoveTask

整体环境java1.7+hadoop2.7+hive1.2;

hive执行的mr结束后,报以下错误:
Failed with exception Unable to move source hdfs://x1/hive/stagingdir_hive_2018-04-27_10-08-41_073_4546675974966003896-1/-ext-10001 to destination hdfs://x2/hive/warehouse/tag_2018042710068970_1
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

原因:
scratchdir和warehouse在多个权限的目录下;
hdfs://x1/hive/stagingdir 和 hdfs://x2/hive/warehouse ;

解决方法:
将两个目录的权限设置一致;
set hive.exec.scratchdir=hdfs://x2/hive/scratchdir/;
set hive.metastore.warehouse.dir=hdfs://x2/hive/warehouse/;

可将参数加到~/.hiverc中;

添加新评论