Hive 0.14.0 does not start

I have hasoop 1.2.1 and I have hive 0.14.0 installed on one node

$ hive Logging initialized using configuration in jar:file:/usr/local/hive/lib/hive-common-0.14.0.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: rwxrwxr-x at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:444) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:672) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616) 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: rwxrwxr-x at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:529) at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:478) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:430) ... 7 more 

The root dir: / tmp / hive file on HDFS must be writable. Current permissions: rwxrwxr-x.

I am using hadoop fs -chmod g+w /tmp/hive but not working.

+5
source share
3 answers

Update the resolution of your HDFS / tmp / hive directory with the following command

 hadoop fs -chmod 777 /tmp/hive 

If so, you can remove / tmp / hive on both local and hdf.

 hadoop fs -rm -r /tmp/hive; rm -rf /tmp/hive 

Only temporary files are stored in this place. No problem, even if we remove it, it will be created when required with the appropriate permissions.

+8
source

I experimented a bit with this and thought it might be useful to someone.

When hive 0.14.0 starts without first creating / tmp / hive in HDFS, this directory is created with 711 mode.

 drwx--x--x - hadoop supergroup 0 2014-12-08 18:47 /tmp/hive 

If instead a directory is created via hadoop dfs -mkdir /tmp/hive , it defaults to 755 mode.

 drwxr-xr-x - hadoop supergroup 0 2014-12-09 11:13 /tmp/hive 

The minimum permissions required to run the bush without errors is 733.

 hadoop dfs -chmod 733 /tmp/hive 

The result is as follows and the hive starting successfully.

 drwx-wx-wx - hadoop supergroup 0 2014-12-09 11:13 /tmp/hive 

This makes me think that 0.14.0 hive does the wrong thing when it creates this directory.

+2
source

Check the value for the tag below to hive-site.xml, then change the permission for the specified folder

 <property> <name>hive.exec.local.scratchdir</name> <value>/tmp/mydir</value> <description>Local scratch space for Hive jobs</description> </property> hadoop fs -rmr /tmp/mydir; hadoop fs -mkdir /tmp/mydir; hadoop fs -chmod 777 /tmp/mydir; hadoop fs -chmod -R 777 /tmp/mydir; 
0
source

Source: https://habr.com/ru/post/1207097/


All Articles