Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 01-30-2016 11:31 AM
Just started using a Hortonworks sandbox on Azure, no previous experience. Started going through the 'How to process data with Apache Hive' tutorial...one of the first steps is to upload files to /user/admin. It doesn't exist. I am not able to create the admin directory under /user because the add directory option is greyed out. Instead I create a new directory under /tmp and successfully uploaded the files. However I get to loading the data into the table:
LOAD DATA INPATH '/tmp/admin/Batting.csv' OVERWRITE INTO TABLE temp_batting;
and get :
INFO : Loading data to table default.temp_batting from hdfs://sandbox.hortonworks.com:8020/tmp/admin/Batting.csv ERROR : Failed with exception Unable to move source hdfs://sandbox.hortonworks.com:8020/tmp/admin/Batting.csv to destination hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse/temp_batting/Batting.csv org.apache.hadoop.hive.ql.metadata.HiveException: Unable to move source hdfs://sandbox.hortonworks.com:8020/tmp/admin/Batting.csv to destination
.
Caused by: org.apache.hadoop.security.AccessControlException: Permission denied: user=hive, access=WRITE, inode="/tmp/admin/Batting.csv":admin:hdfs:drwxr-xr-x
Obviously a permissions error, but how do I change them, and how can I create /user/admin for future use?
Thanks.
Created 01-30-2016 11:55 AM
See the following:https://community.hortonworks.com/questions/7739/permission-denied-and-no-such-file-or-directory.htm...
sudo su - hdfs hdfs dfs -mkdir /user/admin hdfs dfs -chown root:hdfs /user/admin
Created 01-30-2016 11:55 AM
See the following:https://community.hortonworks.com/questions/7739/permission-denied-and-no-such-file-or-directory.htm...
sudo su - hdfs hdfs dfs -mkdir /user/admin hdfs dfs -chown root:hdfs /user/admin
Created 01-30-2016 12:41 PM
@Ancil McBarnett Thanks for the prompt reply. Where can I run these commands from? I've only really used the Hive view so far.
Created 01-30-2016 12:55 PM
Created 01-30-2016 06:29 PM
Hi @Adrian Savory what tutorial are you following. I thought the tutorial mentioned to load to /tmp/admin which it states to create I believe mentioned here:
Created 02-01-2016 01:48 PM
@rmolina it's this one:
http://hortonworks.com/hadoop-tutorial/how-to-process-data-with-apache-hive/
Navigate to /user/admin and click on the Upload button.
Created 02-01-2016 02:17 PM
All sorted now thanks. I could not tell how to change permissions within the Hive shell and did not know how to get to a command line to run the hdfs commands. Looking at the other tutorial I could see that you needed to right click on the files/directories to change permissions (not obvious on a mac!). So I've now been able to create /user/admin, change permissions and run the load.
Thanks again!