Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Insert overwrite query failing with Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

Insert overwrite query failing with Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

New Contributor

I am a running a insert overwrite query as below.

Insert overwrite directory '/org/data/tmp/webapptempspace/UC3/log' select a.* from a join b on ucase(a.name)=ucase(b.name);

It works fine when one of the table has smaller dataset, but when both tables have huge data, it throws the below error.

Failed with exception Unable to move source /org/data/tmp/webapptempspace/UC3/log/.hive-staging_hive_2016-01-11_04-31-06_067_6297667876520454770-1/-ext-10000
to destination 
14 REPLIES 14

Re: Insert overwrite query failing with Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

@pooja khandelwal Please check the hive log details and see if you have permission to write.

Re: Insert overwrite query failing with Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

New Contributor

Yes, I have permission to write. I am able to run the query for a smaller dataset, but not for a larger dataset.

Re: Insert overwrite query failing with Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

New Contributor

I met the same problem. @pooja khandelwal has this been resolved? Can you provide your solution or accept the best answer?

Re: Insert overwrite query failing with Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

New Contributor

My table 'a' has text format and 'b' has orc format. When I keep both as text, it is working fine.

Re: Insert overwrite query failing with Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

New Contributor

Is there any more information in the logs? (If you're using HiveServer2, the you can look at those logs, or your client logs if you are using the Hive client directly.) The error is caused by a file system error where it's unable to move the file. The file system should log an error message describing why it failed.

Highlighted

Re: Insert overwrite query failing with Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

Rising Star

What MoveTask does is moving some files in /tmp volume to /user volume. When the user running doesn't have the right permissions it does not allow moving files between volumes and throws this exception.

Possible workarounds-

-Check /user and /tmp have the full permission

-Check if the below guys are set to true

hive.metastore.client.setugi=true and

hive.metastore.server.setugi=true. These parameters instruct hive execute jobs under current shell user

if not then try executing it as root.

Re: Insert overwrite query failing with Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

Rising Star

Re: Insert overwrite query failing with Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

Mentor

@pooja khandelwal has this been resolved? Can you provide your solution or accept the best answer?

Re: Insert overwrite query failing with Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

New Contributor

I come across the same issue. But when I look at hive logs as suggested by Neeraj, I got to know that there were Space Quota set at my directory level. Once I cleared the quota, I was able to create table even for large data sets.