Sam Chan
Sam Chan

Reputation: 550

Hive couldn't create directory in hdfs and fail to start?

  1. I am deploying hive 2.3 in remote mode with a mysql database in another machine as metastore.
  2. I am about to finish the whole process and I am checking whether the deployment is working by running bin/hive
  3. Then I got this error:

Exception in thread "main" java.lang.RuntimeException: Couldn't create directory /user/hive/tmp/54de671c-0236-49e2-b967-7c3da8973f3a_resources

  1. I know this is set by the property hive.downloaded.resources.dir in hive-site.xml. And I set it to be /user/hive/tmp/${hive.session_id}_resources.

  2. I have create /user/hive/tmp in hdfs.

  3. I have changed the directory access $hdfs dfs -chmod -R 777 /user/hive/tmp

Upvotes: 4

Views: 3785

Answers (1)

user8996695
user8996695

Reputation: 31

I recently met this problem, too. I have solved it. The key is that "/user/hive/tmp" is not in hdfs, it's in your local folder, and you should create "/user/hive/tmp" in your local folder and change the directory access. Hope to help you solve the problem.

Upvotes: 3

Related Questions