Reputation: 1705
I have installed Hive 2.1.0 with Derby 10.12.1.1 I can run Hive from:
$HIVE_HOME
But when I run from another location such as root or other places it throws an error:
Exception in thread "main" java.lang.RuntimeException: Couldn't create directory $/tmp/98e1866e-f8c7-451d-b958-1f773f0c4b02_resources at org.apache.hadoop.hive.ql.util.ResourceDownloader.ensureDirectory(ResourceDownloader.java:123) at org.apache.hadoop.hive.ql.util.ResourceDownloader.(ResourceDownloader.java:48) at org.apache.hadoop.hive.ql.session.SessionState.(SessionState.java:376) at org.apache.hadoop.hive.ql.session.SessionState.(SessionState.java:350) at org.apache.hadoop.hive.cli.CliSessionState.(CliSessionState.java:60) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:663) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641) 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:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Can anybody help me out?
Upvotes: 3
Views: 2377
Reputation: 1705
I figure out the answer by editing hive-site.xml
<property>
<name>hive.downloaded.resources.dir</name>
<value>$/tmp/${hive.session.id}_resources</value>
<description>Temporary local directory for added resources in the remote file system.</description>
and changed it to
<property>
<name>hive.downloaded.resources.dir</name>
<value>/home/hduser/hive/tmp/${hive.session.id}_resources</value>
<description>Temporary local directory for added resources in the remote file system.</description>
And Problem is solved
Upvotes: 2