Support Questions
Find answers, ask questions, and share your expertise

Hive LOAD DATA INPATH (problems with OVERWRITE clause)

Explorer

Hi,

 

Has sombody facing some problem like that?

 

I've been facing some problems with OVERWRITE clause on command:

 

load data local inpath 'emp.dat' overwrite into table emp;

 

 

Loading data to table default.emp
Failed with exception Unable to move sourcehdfs://localhost:8020/tmp/hive-stabbler/hive_2014-10-09_12-13-44_624_7988255974532992081-1/-ext-10000 to destination /user/hive/warehouse/default.db/emp
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

 

 

workaround 1

 

  1. Tried to change the /tmp/hive-stabbler permission on hdfs to 777. It didn't work.
  2. Tried via Hue interface but it didn't work. Submit button to upload the file was not enabled.
  3. but when I came back to the previous hue screen, a message was displayed saying the file was successfuly uploaded. 
  4. Weird !!
  5. I dropped the table emp and recreated it.
  6. Tried the command: !hdfs dfs -copyFromLocal emp.dat /user/hive/warehouse/default.db/emp;
  7. It worked.

--

workaround 2

 

  1. Tried to create a table with different name as the file emp.dat. This time tablename employee, file emp.dat
  2. load data local inpath 'employee.dat' overwrite into table emp;
  3. Same error.
  4. I dropped the table emp;
  5. Recreated it.
  6. Tried to load data without overwrite parameter, it worked with table emp and file emp.dat
  7. load data local inpath 'emp.dat'into table emp;
  8. It worked.

 

--

 

It seems could be a problem with overwrite parameter.

 

 

I've followed this cloudera instructions link

 

I saw the same problem here but it has no reply.

 

and this one from apache hive community related to the problem where the table has the same name of the table.

 

 

Thanks

 

Fabricio

 

2 REPLIES 2

New Contributor

it is a clear permission issue only..

Contributor

Yea I agree, it is mostly likely a permission error, I would check the hive logs to see exactly which file/dir path is giving the error.

 

Thanks

Szehon