Hadoop Hive cannot move a source to a target… here is a solution to the problem.
Hadoop Hive cannot move a source to a target
I’m trying to use Hive 1.2.0 on Hadoop 2.6.0. I created an employee
table. However, when I run the following query:
hive> load data local inpath '/home/abc/employeedetails' into table employee;
I get the following error:
Failed with exception Unable to move source file:/home/abc/employeedetails to destination hdfs://localhost:9000/user/hive/warehouse/employee/employeedetails_copy_1
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask
What am I doing wrong here? Do I need to set any specific permissions? Thanks in advance!
Solution
As Rio mentioned, the problem involves a lack of authority to load data into the hive table. I found the following command to solve my problem:
hadoop fs -chmod g+w /user/hive/warehouse