V.Sriram
V.Sriram

Reputation: 774

Why i am not able to create child folders within parent folder structure in hadoop hdfs?

I am facing issues while creating child folders (recursive) within parent folder structure in HDFS

Using Hadoop ver 2.7.1

sample : hadoop fs -mkdir /test/sample/logfiles

If i type in the above command in terminal, i am not able to create the complete folder structure up until level2 (logFiles).

i am able to create test/sample if using below hadoop fs -mkdir /test/sample

Any internal configuration should be done which is limiting the folder creation structure level.?

Any assistance is greatly appreciated.

Thanks - Sriram

Upvotes: 0

Views: 214

Answers (2)

PradeepKumbhar
PradeepKumbhar

Reputation: 3421

From hadoop commands documentation:

Usage: hadoop fs -mkdir [-p]

Takes path uri’s as argument and creates directories.

Options:

The -p option behavior is much like Unix mkdir -p, creating parent directories along the path.

Upvotes: 2

facha
facha

Reputation: 12512

Use -p flag:

hadoop fs -mkdir -p /test/sample/logfiles

Upvotes: 1

Related Questions