Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Unable To Upload A Table In Hive : java.sql.SQLException Error

avatar
Explorer

@Aditya Sirna

@Jay Kumar SenSharma

I was trying to upload a database table in Hive View. But after choose the file and make the relevant settings, and then when I hit the UPLOAD TABLE Option, I get the following error :

java.sql.SQLException:Errorwhile processing statement: FAILED:ExecutionError,return code 1fromorg.apache.hadoop.hive.ql.exec.DDLTask.MetaException(message:java.security.AccessControlException:Permission denied:user=hive, path="file:/":root:root:drwxr-xr-x)

I was denied permission to upload the table. I am using the account of maria_dev which is there by default in Ambari UI.

I tried changing the permission and try again by using the following command :

hdfs dfs -chmod 777/

On running this command in hortonworks sandbox terminal, I got the following error :

Exception in thread "main" java.lang.RuntimeException: core-site.xml not found                                                                       
        at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2640)                                                                
        at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2566)                                                               
        at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2451)                                                                    
        at org.apache.hadoop.conf.Configuration.set(Configuration.java:1164)                                                                         
        at org.apache.hadoop.conf.Configuration.set(Configuration.java:1136)                                                                         
        at org.apache.hadoop.conf.Configuration.setBoolean(Configuration.java:1472)                                                                  
        at org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions(GenericOptionsParser.java:321)                                          
        at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:487)                                            
        at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:170)                                                         
        at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:153)                                                         
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)                                                                                 
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)                                                                                 
        at org.apache.hadoop.fs.FsShell.main(FsShell.java:356) 

I used to get a similar error earlier too.

I was uploading the table from my laptop's desktop, i.e. Local File System. I didn't use any Hive Query to upload the table. In the Hive View of Ambari UI, there is an option of "UPLOAD TABLE". I clicked on that option, then I set the Field Delimiter as Tab delimited and then clicked on "Upload Table". After this, I got the error that I mentioned.

Can somebody help me to sort out this error ?

17 REPLIES 17

avatar
Master Mentor

@Amogh Suman

Can you please check and share the MD5 result of your HDP Sandbox? It should match the MD5 result that is mentioned in the https://hortonworks.com/downloads/#

As Sandbox is in GBs so sometimes it happens that due to incomplete install it gets corrupted and hence the MD5 is good to validate if it is corrupted or correct.

.

avatar
Explorer

@Jay Kumar SenSharma

How to check that ? Should I use the command "sandbox version" in the sandbox terminal ?

avatar
Master Mentor

@Amogh Suman

On MAC you can find the MD5 of any file as following:

# md5 /tmp/HDP2.6_sandbox.ova 


On Linux (RHEL/Centos/Fedora..etc) you can find the MD5 of any file as following:

# md5sum /tmp/HDP2.6_sandbox.ova 



NOTE: your file name may be different "HDP2.6_sandbox.ova"

.

avatar
Explorer

@Jay Kumar SenSharma

@Aditya Sirna

I downloaded the sandbox for docker from hortonworks.com again and then re-installed it. All the errors were gone.

The missing files were found. But now, I am again stuck at this upload table thing. The upload table is not showing any error. But the ambari UI hangs up after hitting the upload table button in Hive View. I'm attaching the screenshot :

48383-hive-hang.png

There is no progress after this popup of "Upload Progress"

Please have a look and suggest me how to get around with this.

avatar
Master Mentor

@Amogh Suman

Please try using Hive View 2.0 instead of Hive View (1.5).

avatar
Master Mentor

@Amogh Suman

Using Ambari Hive View (2.0)

Ambari UI --> Hive View (2.0) --> Tables (Tab) --> "+ New Table" (top right Corner) --> Upload Tables (Middle Right Corner)


3 Great Reasons to Try Apache Hive View 2.0 : https://hortonworks.com/blog/3-great-reasons-to-try-hive-view-2-0/

avatar
Explorer

@Jay Kumar SenSharma

I tried Hive 2.0 as well, but again, the screen hangs up. After creation of a temporary table, it shows that it inserting the rows from the temporary table into the actual table. But after that, it just gets stuck.

avatar
Master Mentor

@Amogh Suman

Can you please share the Screenshot of "Hive View 2.0" where it is hanging.

Also please share the "HiveServer2.log" And the View logs which you can find inside

# less /var/log/hive/hiveserver2.log
# less /var/log/ambari-server/hive-next-view/hive-view.log 
# less /var/log/ambari-server/hive20-view/hive20-view.log 

.

Also please run the "HiveService Check" once to see if everything is OK from hive side.

If needed then please restart the "Hive" Service.