Installation issue hive

Hi Guys,

SOmetimes while installing hive and written our first hive command to enter into hive CLI

we get this prolem as i  also get the issue , therfore thought to share with you all .

the problem will e something like ;

user@ubuntuvm:~$ hive

Logging initialized using configuration in jar:file:/usr/local/hive_0.1/lib/hive-common-1.2.1.jar!/hive-log4j.properties
Exception in thread “main” java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx–x–x
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:522)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:677)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:160)

Caused by: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx–x–x
at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:612)
at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:554)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:508)
… 7 more

when get this issue just ollow following steps:-

user@ubuntuvm:~$ hadoop fs -ls /
Found 4 items
-rw-r–r– 1 user supergroup 107 2015-05-31 07:44 /edata
-rw-r–r– 1 user supergroup 331 2015-06-23 05:18 /jsondata
drwxr-xr-x – user supergroup 0 2015-10-01 04:53 /tmp
drwxr-xr-x – user supergroup 0 2015-09-30 03:41 /usr

then change the permission of /tmp

hadoop fs -chmod 777 /tmp
user@ubuntuvm:~$ hadoop fs -ls /
Found 5 items
-rw-r–r– 1 user supergroup 107 2015-05-31 07:44 /edata
-rw-r–r– 1 user supergroup 331 2015-06-23 05:18 /jsondata
drwxrwxrwx – user supergroup 0 2015-10-01 06:03 /tmp
drwxr-xr-x – user supergroup 0 2015-10-01 06:10 /user
drwxr-xr-x – user supergroup 0 2015-09-30 03:41 /usr

as well

user@ubuntuvm:~$ hadoop fs -chmod 777 /tmp/hive

hadoop fs -ls /tmp
Found 1 items
drwxrwxrwx – user supergroup 0 2015-10-01 06:09 /tmp/hive

Then :-

user@ubuntuvm:~$ hive

Logging initialized using configuration in jar:file:/usr/local/hive_0.1/lib/hive-common-1.2.1.jar!/hive-log4j.properties
hive>

Thanks,

Hope you guys like this

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s