Hive 2.3.9
Ubuntu16.04.3-64bit
我已经开始使用hadoop:
hadoop@ubuntu:~/hadoop/sbin$ ./start-all.sh
Starting namenodes on [localhost]
Starting datanodes
Starting secondary namenodes [ubuntu]
Starting resourcemanager
Starting nodemanagers
并在 hdfs 中创建 /tmp/hive 文件夹,并授予 /tmp 的所有权限:
$ cd $HADOOP_HOME/bin
$ ./hadoop fs -mkdir -p /tmp/hive
$ ./hadoop fs -chmod -R 777 /tmp
$ /home/hadoop/hadoop/bin/hadoop fs -ls /tmp
Found 2 items
drwxrwxrwx - hadoop supergroup 0 2021-06-29 17:58 /tmp/hadoop-yarn
drwxrwxrwx - hadoop supergroup 0 2021-07-06 16:03 /tmp/hive
但是当我尝试启动配置单元时,它失败了:
hadoop@ubuntu:/home/hive/hive$ bin/hive
Exception in thread "main" java.lang.RuntimeException: Couldn't create directory /tmp/hive/7b9372f6-06d7-4c73-83ec-8c43db8e2c72_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:323)
at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
有人可以帮忙吗?