为什么我无法在 hadoop hdfs 的父文件夹结构中创建子文件夹?

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

我在 HDFS 的父文件夹结构中创建子文件夹(递归)时遇到问题

使用 Hadoop 版本 2.7.1

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

如果我在终端中输入以上命令,我将无法创建直到 level2 (logFiles) 的完整文件夹结构。

如果使用下面的方法,我可以创建 test/sample hadoop fs -mkdir /test/sample

应该进行任何限制文件夹创建结构级别的内部配置。?

非常感谢任何帮助。

谢谢 - Sriram

使用-p标志:

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

来自 hadoop 命令 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.