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-05-2016 02:21 PM
Problem loading data to table in this tutorial
http://hortonworks.com/hadoop-tutorial/how-to-process-data-with-apache-hive/
This command
<code>LOAD DATA INPATH '/user/admin/Batting.csv' OVERWRITE INTO TABLE temp_batting;
produces error
H110 Unable to submit statement. Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [admin] does not have [READ] privilege on [hdfs://sandbox.hortonworks.com:8020/user/admin/elecMonthly_Orc] [ERROR_STATUS]
I created both user/admin and temp/admin folders. I used hdfs superuser to make admin owner of file, folder, and even parent folder. I gave full permissions in HDFS. and this is clearly shown in Ambari. Error persists.
Can anyone help? Thanks
Created 02-03-2016 04:17 PM
It was because when I thought I was creating an elecMonthly_Orc file, actually I created an elecMonthly_Orc folder with several files three files: _SUCCESS, part-r-r-00000-1a0c14e3-0dd0-42db-abc7-7f655a02f634.orc ... and another similar orc files. The files within the elecMonthly_Orc directory were owned by Hive, and that's why the permissions error.
Resolved by using command line as superuser hdfs:
hadoop fs -chown admin:admin /user/admin/elecMonthly_Orc/*.*
Now I just have to figure out how to recombine Orc files in Hive!
Created 01-05-2016 02:26 PM
Can you please take a screenshot of the output of
hdfs dfs -ls /user/admin/elecMonthly_Orc
Created 01-05-2016 02:29 PM
@Aidan Condron what user are you running the Hive Statement as?
Created 02-03-2016 11:08 AM
Thanks Andrew. Think it was discongruity between Hive account running statement and Admin owing file. Thanks for this and sorry for delay in reply.
Created 02-03-2016 11:10 AM
@Aidan Condron Is it resolved?
Created 02-03-2016 11:48 AM
@Aidan Condron accept best answer below
Created 01-05-2016 02:33 PM
Are you using the latest sandbox? Try the Ambari Hive view, it has the Upload File action specifically for csv files.
Created on 01-05-2016 02:35 PM - edited 08-19-2019 05:20 AM
Thanks for answering so quickly!
Created 01-05-2016 02:38 PM
@Aidan Condron what about the directory about it. What's the output of:
hdfs dfs -ls /user/admin
It looks like the files are owned by the user 'Spark'. Which user is the running the Hive Statement?
Created on 01-05-2016 02:43 PM - edited 08-19-2019 05:20 AM
admin is running statement as per tutorial
I thought I did hdfs chown on files. Shown in Ambari as owned by admin