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 19 in Big Data Hadoop by Hans
• 130 points

edited May 19 by Hans 222 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 by MD
• 56,520 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
530 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
491 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
13,729 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
• 10,950 points
680 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
• 10,950 points
5,882 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
• 10,950 points
884 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
37,113 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,320 points
2,198 views
0 votes
1 answer