-2

I can create directory in HDFS under current user directory

hdfs dfs -mkdir /user/john.doe/data

Above command executed without issue. However data directory was not created under /home/john.doe directory in Linux

what is the best way to create hdfs directory in associated linux directory?

jww
  • 97,681
  • 90
  • 411
  • 885
Dreamer
  • 7,333
  • 24
  • 99
  • 179

1 Answers1

1

Are you expecting a directory with name data under the directory /home/john.doe? then the expectation is wrong.

HDFS directories are never materialized to the disk (They are never created on local filesystem). Namenode builds this directory mappings and this datastructure is synced to filesystem periodically.

But files/blocks are materialized to disk. You can see them under the configured location. Read this post for more info. Where HDFS stores data

HoldOffHunger
  • 18,769
  • 10
  • 104
  • 133
Madhusoodan P
  • 681
  • 9
  • 20
  • 2
    Please close off-topic questions. – jww Oct 05 '19 at 08:36
  • Please don't post answers on obviously off topic/bad questions! [See: **Should one advise on off topic questions?**](//meta.stackoverflow.com/q/276572) – Dharman Oct 05 '19 at 22:46