nexr / RHive

RHive is an R extension facilitating distributed computing via Apache Hive.
http://nexr.github.io/RHive
122 stars 63 forks source link

can't write dataframe to /user/hive/warehouse #72

Closed ghost closed 10 years ago

ghost commented 10 years ago

rhive.write.table(myDataFrame,"rhiveterm") No encryption was performed by peer. Error: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

I am connecting to hiveserver2 which is run as hive - so the data gets stored in a directory owned by the hdfs user - but rhive because it is using hiveserver2 is using the hive user who does not have permisison to the hdfs user /tmp/rhive directory to move files - copy yes but not move. Is there are reason why we do a move instead of a copy?

ghost commented 10 years ago

The issue was related to hive not owning the

hdfsPath it was trying to overwrite from

Once I changed it to be owned by hive the code in .rhive.write.table

'query <- .generateLoadDataQuery(tableName, hdfsPath)'

worked fine