starting hive gave me exception

+1 vote

Hi everybody I just completed hive and apache derby installation and i started schematool successfuly but when i type  bin/hive
it gaves me the following exception

Exception in thread "main" java.lang.RuntimeException: Couldn't create directory /user/local/hive/tmp/java/f357efd5-2a26-47d5-bd43-d74f0a858e1e_resources

    at org.apache.hadoop.hive.ql.util.ResourceDownloader.ensureDirectory(ResourceDownloader.java:116)
    at org.apache.hadoop.hive.ql.util.ResourceDownloader.<init>(ResourceDownloader.java:47)
    at org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:401)
    at org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:372)
    at org.apache.hadoop.hive.cli.CliSessionState.<init>(CliSessionState.java:60)
    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:708)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:686)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:239)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:153)
May 20, 2020 in Big Data Hadoop by Hans
• 130 points

edited May 20, 2020 by Hans 2,371 views

1 answer to this question.

0 votes

Hi@Hans,

You may got this error, if you didn't set the below properties in your hive-site.xml file.

  <property>
    <name>hive.downloaded.resources.dir</name>
    <value>${system:java.io.tmpdir}/${hive.session.id}_resources</value>
  </property>

  <property>
    <name>hive.metastore.warehouse.dir</name>
    <value>hdfs://user/hive/warehouse</value>
  </property>

Also make sure you have /user/hive/warehouse folder in hdfs cluster.

$ hdfs dfs -mkdir /user/hive/warehouse
$ hdfs dfs -chmod g+w /tmp
$ hdfs dfs -chmod g+w /user/hive/warehouse
answered May 20, 2020 by MD
• 95,460 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Hive with JSON: getting EOF exception while querying

You are missing the commas in your ...READ MORE

answered Aug 30, 2018 in Big Data Hadoop by Neha
• 6,300 points
1,730 views
0 votes
1 answer

Hive queries from mapreduce gives Null Pointer Exception.

I think you have upgraded CDH. This ...READ MORE

answered Jun 4, 2019 in Big Data Hadoop by Rihan
2,563 views
0 votes
3 answers

What is Hive? Is Hive a database?

Hive is a data Warehouse infrastructure/system built ...READ MORE

answered Jul 1, 2019 in Big Data Hadoop by Ved Gupta
23,725 views
0 votes
1 answer

How Impala is fast compared to Hive in terms of query response?

Impala provides faster response as it uses MPP(massively ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
2,216 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,028 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,535 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,830 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
4,611 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP