0

I've installed hadoop and hive. I am trying to configure hive as follows:

hadoop fs -mkdir       /data/hive/warehouse

I keep getting this error:

mkdir: '/data/hive/warehouse': No such file or directory

Do I need to create the directories with os commands before issuing the hadoop fs command? Any ideas?

user1471980
  • 10,127
  • 48
  • 136
  • 235

1 Answers1

1

You're missing the -p option similar to UNIX/Linux.

$ hadoop fs -mkdir -p /data/hive/warehouse

In addition, you should also chmod 1777 this directory if you're setting this up for multiple users and add /user/hive if you're running Hive as user hive.

$ hadoop fs -chmod -R 1777 /data/hive/warehouse
$ hadoop fs -mkdir -p /user/hive
$ hadoop fs -chown hive:hive /user/hive

See Apache Hive File System Permissions in CDH and Where does Hive store files in HDFS?.

tk421
  • 5,775
  • 6
  • 23
  • 34