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

Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

Solved Go to solution

Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

Explorer

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

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

Explorer

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!

View solution in original post

14 REPLIES 14

Re: Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

@Aidan Condron

Can you please take a screenshot of the output of

hdfs dfs -ls /user/admin/elecMonthly_Orc

Re: Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

@Aidan Condron what user are you running the Hive Statement as?

Re: Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

Explorer

Thanks Andrew. Think it was discongruity between Hive account running statement and Admin owing file. Thanks for this and sorry for delay in reply.

Re: Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

@Aidan Condron Is it resolved?

Re: Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

Mentor

@Aidan Condron accept best answer below

Re: Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

Are you using the latest sandbox? Try the Ambari Hive view, it has the Upload File action specifically for csv files.

Re: Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

Explorer

Thanks for answering so quickly!

1196-miqgf.png

Re: Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

@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?

Re: Error on Tutorial "How to Process Data with Apache Hive" - Cannot load data into Hive tables

Explorer

admin is running statement as per tutorial

I thought I did hdfs chown on files. Shown in Ambari as owned by admin

1197-5noch.png