From 0bfa7d79d0fc5f127fd785e8ba3bc83dab8df991 Mon Sep 17 00:00:00 2001 From: Robert Joseph Evans Date: Wed, 25 Jul 2012 13:56:29 +0000 Subject: [PATCH] HADOOP-8551. fs -mkdir creates parent directories without the -p option (John George via bobby) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1365588 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop-common/CHANGES.txt | 3 + .../org/apache/hadoop/fs/shell/Mkdir.java | 8 +- .../src/test/resources/testHDFSConf.xml | 362 ++++++++++-------- 3 files changed, 209 insertions(+), 164 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index ebd833bdb6..b5b671c7c1 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -841,6 +841,9 @@ Release 0.23.3 - UNRELEASED HADOOP-8606. FileSystem.get may return the wrong filesystem (Daryn Sharp via bobby) + HADOOP-8551. fs -mkdir creates parent directories without the -p option + (John George via bobby) + Release 0.23.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Mkdir.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Mkdir.java index eb0fd22562..d92a5343c9 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Mkdir.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Mkdir.java @@ -23,9 +23,11 @@ import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; +import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.shell.PathExceptions.PathExistsException; import org.apache.hadoop.fs.shell.PathExceptions.PathIOException; import org.apache.hadoop.fs.shell.PathExceptions.PathIsNotDirectoryException; +import org.apache.hadoop.fs.shell.PathExceptions.PathNotFoundException; /** * Create the given dir @@ -66,7 +68,11 @@ protected void processPath(PathData item) throws IOException { @Override protected void processNonexistentPath(PathData item) throws IOException { - // TODO: should use createParents to control intermediate dir creation + // check if parent exists. this is complicated because getParent(a/b/c/) returns a/b/c, but + // we want a/b + if (!item.fs.exists(new Path(item.path.toString()).getParent()) && !createParents) { + throw new PathNotFoundException(item.toString()); + } if (!item.fs.mkdirs(item.path)) { throw new PathIOException(item.toString()); } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml index 1f6a6265ff..a611c2e3c3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml @@ -129,7 +129,7 @@ ls: directory using relative path - -fs NAMENODE -mkdir dir1 + -fs NAMENODE -mkdir -p dir1 -fs NAMENODE -ls @@ -150,10 +150,10 @@ ls: directory using globbing - -fs NAMENODE -mkdir dir1 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir3 - -fs NAMENODE -mkdir dir4 + -fs NAMENODE -mkdir -p dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir3 + -fs NAMENODE -mkdir -p dir4 -fs NAMENODE -ls @@ -308,7 +308,7 @@ ls: Non-URI input dir at Namenode's path - -fs NAMENODE -mkdir NAMENODE/user/dir1 + -fs NAMENODE -mkdir -p NAMENODE/user/dir1 -fs NAMENODE -ls hdfs:///user/ @@ -329,7 +329,7 @@ ls: dir at hdfs:// path - -fs NAMENODE -mkdir hdfs:///user/dir1 + -fs NAMENODE -mkdir -p hdfs:///user/dir1 -fs NAMENODE -ls hdfs:///user/ @@ -350,9 +350,9 @@ ls: Non-URI input dir at Namenode's path using globing - -fs NAMENODE -mkdir NAMENODE/user/dir1 - -fs NAMENODE -mkdir NAMENODE/user/dir2 - -fs NAMENODE -mkdir NAMENODE/user/dir3 + -fs NAMENODE -mkdir -p NAMENODE/user/dir1 + -fs NAMENODE -mkdir -p NAMENODE/user/dir2 + -fs NAMENODE -mkdir -p NAMENODE/user/dir3 -fs NAMENODE -ls hdfs:///user/ @@ -381,9 +381,9 @@ ls: dir at hdfs:// path using globing - -fs NAMENODE -mkdir hdfs:///user/dir1 - -fs NAMENODE -mkdir hdfs:///user/dir2 - -fs NAMENODE -mkdir hdfs:///user/dir3 + -fs NAMENODE -mkdir -p hdfs:///user/dir1 + -fs NAMENODE -mkdir -p hdfs:///user/dir2 + -fs NAMENODE -mkdir -p hdfs:///user/dir3 -fs NAMENODE -ls hdfs:///user/ @@ -533,13 +533,13 @@ ls: files/directories using relative path - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 - -fs NAMENODE -mkdir dir0/dir1/dir1 - -fs NAMENODE -mkdir dir0/dir1/dir2 - -fs NAMENODE -mkdir dir0/dir2 - -fs NAMENODE -mkdir dir0/dir2/dir1 - -fs NAMENODE -mkdir dir0/dir2/dir2 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 + -fs NAMENODE -mkdir -p dir0/dir1/dir1 + -fs NAMENODE -mkdir -p dir0/dir1/dir2 + -fs NAMENODE -mkdir -p dir0/dir2 + -fs NAMENODE -mkdir -p dir0/dir2/dir1 + -fs NAMENODE -mkdir -p dir0/dir2/dir2 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 @@ -621,13 +621,13 @@ ls: files/directories using globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 - -fs NAMENODE -mkdir dir0/dir1/dir1 - -fs NAMENODE -mkdir dir0/dir1/dir2 - -fs NAMENODE -mkdir dir0/dir2 - -fs NAMENODE -mkdir dir0/dir2/dir1 - -fs NAMENODE -mkdir dir0/dir2/dir2 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 + -fs NAMENODE -mkdir -p dir0/dir1/dir1 + -fs NAMENODE -mkdir -p dir0/dir1/dir2 + -fs NAMENODE -mkdir -p dir0/dir2 + -fs NAMENODE -mkdir -p dir0/dir2/dir1 + -fs NAMENODE -mkdir -p dir0/dir2/dir2 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 @@ -1045,7 +1045,7 @@ du: directory using relative path - -fs NAMENODE -mkdir dir0 + -fs NAMENODE -mkdir -p dir0 -fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes -fs NAMENODE -du dir0 @@ -1352,13 +1352,13 @@ dus: directories/files using relative path - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 - -fs NAMENODE -mkdir dir0/dir1/dir1 - -fs NAMENODE -mkdir dir0/dir1/dir2 - -fs NAMENODE -mkdir dir0/dir2 - -fs NAMENODE -mkdir dir0/dir2/dir1 - -fs NAMENODE -mkdir dir0/dir2/dir2 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 + -fs NAMENODE -mkdir -p dir0/dir1/dir1 + -fs NAMENODE -mkdir -p dir0/dir1/dir2 + -fs NAMENODE -mkdir -p dir0/dir2 + -fs NAMENODE -mkdir -p dir0/dir2/dir1 + -fs NAMENODE -mkdir -p dir0/dir2/dir2 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data15bytes -fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir1/data30bytes @@ -3275,7 +3275,7 @@ rm: removing a directory (relative path) - -fs NAMENODE mkdir dir0 + -fs NAMENODE mkdir -p dir0 -fs NAMENODE -rm dir0 @@ -3606,7 +3606,7 @@ rm: removing a directory (relative path) - -fs NAMENODE -mkdir dir0 + -fs NAMENODE -mkdir -p dir0 -fs NAMENODE -rm -r dir0 @@ -3655,10 +3655,10 @@ rm: removing directories by globbing (relative path) - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir1 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir3 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir3 -fs NAMENODE -rm -r dir* @@ -3986,7 +3986,7 @@ put: putting file into a directory(absolute path) - -fs NAMENODE -mkdir /dir0/dir1/data + -fs NAMENODE -mkdir -p /dir0/dir1/data -fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data --> -fs NAMENODE -du /dir0/dir1/data @@ -4004,7 +4004,7 @@ put: putting file into a directory(relative path) - -fs NAMENODE -mkdir dir0/dir1/data + -fs NAMENODE -mkdir -p dir0/dir1/data -fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data -fs NAMENODE -du dir0/dir1/data @@ -4044,7 +4044,7 @@ put: putting many files into an existing directory(relative path) - -fs NAMENODE -mkdir dir0 + -fs NAMENODE -mkdir -p dir0 -fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0 -fs NAMENODE -du dir0 @@ -4206,7 +4206,7 @@ put: putting file into a directory in hdfs:// path - -fs NAMENODE -mkdir /dir1/data + -fs NAMENODE -mkdir -p /dir1/data -fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir1/data -fs NAMENODE -du hdfs:///dir1/data/ @@ -4329,7 +4329,7 @@ put: putting file into a directory in Namenode's path - -fs NAMENODE -mkdir /dir1/data + -fs NAMENODE -mkdir -p /dir1/data -fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir1/data -fs NAMENODE -du NAMENODE/dir1/data @@ -4471,7 +4471,7 @@ copyFromLocal: copying file into a directory(absolute path) - -fs NAMENODE -mkdir /dir0/dir1/data + -fs NAMENODE -mkdir -p /dir0/dir1/data -fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /dir0/dir1/data -fs NAMENODE -du /dir0/dir1/data/* @@ -4489,7 +4489,7 @@ copyFromLocal: copying file into a directory(relative path) - -fs NAMENODE -mkdir dir0/dir1/data + -fs NAMENODE -mkdir -p dir0/dir1/data -fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes dir0/dir1/data -fs NAMENODE -du dir0/dir1/data/* @@ -4529,7 +4529,7 @@ copyFromLocal: copying many files into an existing directory(relative path) - -fs NAMENODE -mkdir dir0 + -fs NAMENODE -mkdir -p dir0 -fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0 -fs NAMENODE -du dir0 @@ -5051,7 +5051,7 @@ cat: contents of files(relative path) using globbing - -fs NAMENODE -mkdir dir0 + -fs NAMENODE -mkdir -p dir0 -fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes -fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes -fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes @@ -5093,7 +5093,7 @@ cat: contents of files(relative path) without globbing - -fs NAMENODE -mkdir dir0 + -fs NAMENODE -mkdir -p dir0 -fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes -fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes -fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes @@ -5162,7 +5162,7 @@ cat: contents of directory(relative path) - -fs NAMENODE -mkdir dir1 + -fs NAMENODE -mkdir -p dir1 -fs NAMENODE -cat dir1 @@ -5444,11 +5444,30 @@ + + + mkdir: creating directory (absolute path) + + -fs NAMENODE -mkdir /dir0 + -fs NAMENODE -mkdir /dir0/b/ + -fs NAMENODE -du -s /dir0/b + + + -fs NAMENODE -rm /user + + + + RegexpComparator + ^0\s+/dir0/b + + + + mkdir: creating directory (relative path) - -fs NAMENODE -mkdir dir0 + -fs NAMENODE -mkdir -p dir0 -fs NAMENODE -du -s dir0 @@ -5497,10 +5516,10 @@ mkdir: creating many directories (relative path) - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir1 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir3 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir3 -fs NAMENODE -du -s dir* @@ -5547,7 +5566,7 @@ mkdir: creating a directory with the name of an already existing file -fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes - -fs NAMENODE -mkdir data15bytes + -fs NAMENODE -mkdir -p data15bytes -fs NAMENODE -rm -r data15bytes @@ -5721,10 +5740,27 @@ - mkdir: Test recreate of existing directory fails + mkdir: Test create of directory with no parent and no -p fails -fs NAMENODE -rm -r -f dir0 -fs NAMENODE -mkdir dir0/dir1 + + + -fs NAMENODE -rm -r dir0 + + + + RegexpComparator + mkdir: `dir0/dir1': No such file or directory + + + + + + mkdir: Test recreate of existing directory fails + + -fs NAMENODE -rm -r -f dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -mkdir dir0/dir1 @@ -5742,7 +5778,7 @@ mkdir: Test recreate of existing directory with -p succeeds -fs NAMENODE -rm -r -f dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -mkdir -p dir0/dir1 @@ -6339,7 +6375,7 @@ stat: statistics about directory(relative path) - -fs NAMENODE -mkdir dirtest + -fs NAMENODE -mkdir -p dirtest -fs NAMENODE -stat "%n-%b-%o" dirtest @@ -6399,7 +6435,7 @@ -fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes -fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes -fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes - -fs NAMENODE -mkdir datadir + -fs NAMENODE -mkdir -p datadir -fs NAMENODE -stat "%n-%b" data* @@ -6501,7 +6537,7 @@ -fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes -fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes -fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes - -fs NAMENODE -mkdir hdfs:///dir0/datadir + -fs NAMENODE -mkdir -p hdfs:///dir0/datadir -fs NAMENODE -stat "%n-%b" hdfs:///dir0/data* @@ -6588,7 +6624,7 @@ -fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes -fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes -fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes - -fs NAMENODE -mkdir NAMENODE/dir0/datadir + -fs NAMENODE -mkdir -p NAMENODE/dir0/datadir -fs NAMENODE -stat "%n-%b" NAMENODE/dir0/data* @@ -6759,7 +6795,7 @@ tail: contents of directory(relative path) - -fs NAMENODE -mkdir dir1 + -fs NAMENODE -mkdir -p dir1 -fs NAMENODE -tail dir1 @@ -6966,7 +7002,7 @@ count: directory using relative path - -fs NAMENODE -mkdir dir1 + -fs NAMENODE -mkdir -p dir1 -fs NAMENODE -count dir1 @@ -7173,10 +7209,10 @@ count: relative path to multiple directories using globbing - -fs NAMENODE -mkdir dir1 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir3 - -fs NAMENODE -mkdir dir4 + -fs NAMENODE -mkdir -p dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir3 + -fs NAMENODE -mkdir -p dir4 -fs NAMENODE -count dir* @@ -7237,10 +7273,10 @@ count: relative path to multiple directories without globbing - -fs NAMENODE -mkdir dir1 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir3 - -fs NAMENODE -mkdir dir4 + -fs NAMENODE -mkdir -p dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir3 + -fs NAMENODE -mkdir -p dir4 -fs NAMENODE -count dir1 dir2 dir3 dir4 @@ -7322,7 +7358,7 @@ count: directory using relative path with -q option - -fs NAMENODE -mkdir dir1 + -fs NAMENODE -mkdir -p dir1 -fs NAMENODE -setQuota 10 dir1 -fs NAMENODE -setSpaceQuota 1m dir1 -fs NAMENODE -count -q dir1 @@ -7539,10 +7575,10 @@ count: relative path to multiple directories using globbing with -q option - -fs NAMENODE -mkdir dir1 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir3 - -fs NAMENODE -mkdir dir4 + -fs NAMENODE -mkdir -p dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir3 + -fs NAMENODE -mkdir -p dir4 -fs NAMENODE -setQuota 10 dir1 -fs NAMENODE -setSpaceQuota 1m dir1 -fs NAMENODE -setQuota 10 dir2 @@ -7619,10 +7655,10 @@ count: relative path to multiple directories without globbing with -q option - -fs NAMENODE -mkdir dir1 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir3 - -fs NAMENODE -mkdir dir4 + -fs NAMENODE -mkdir -p dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir3 + -fs NAMENODE -mkdir -p dir4 -fs NAMENODE -setQuota 10 dir1 -fs NAMENODE -setSpaceQuota 1m dir1 -fs NAMENODE -setQuota 10 dir2 @@ -8482,8 +8518,8 @@ chmod: change permission(octal mode) of directory in relative path - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 @@ -8594,8 +8630,8 @@ chmod: change permission(normal mode) of directory in relative path - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 @@ -8662,8 +8698,8 @@ chmod: change permission(octal mode) of directory in relative path recursively - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 @@ -8730,8 +8766,8 @@ chmod: change permission(normal mode) of directory in relative path recursively - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 @@ -8949,13 +8985,13 @@ chmod: change permission(octal mode) of multiple directories in relative path using globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -9125,13 +9161,13 @@ chmod: change permission(octal mode) of multiple directories in relative path without globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -9301,13 +9337,13 @@ chmod: change permission(normal mode) of multiple directories in relative path using globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -9477,13 +9513,13 @@ chmod: change permission(normal mode) of multiple directories in relative path without globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -9587,13 +9623,13 @@ chmod: change permission(octal mode) of multiple directories in relative path recursively using globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -9697,13 +9733,13 @@ chmod: change permission(octal mode) of multiple directories in relative path recursively without globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -9807,13 +9843,13 @@ chmod: change permission(normal mode) of multiple directories in relative path recursively using globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -9917,13 +9953,13 @@ chmod: change permission(normal mode) of multiple directories in relative path recursively without globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -12183,8 +12219,8 @@ chown: change ownership of directory in relative path - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 @@ -12251,8 +12287,8 @@ chown: change ownership of directory in relative path recursively - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 @@ -12438,13 +12474,13 @@ chown: change ownership of multiple directories in relative path using globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -12614,13 +12650,13 @@ chown: change ownership of multiple directories in relative path without globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -12724,13 +12760,13 @@ chown: change ownership of multiple directories recursively in relative path using globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -12834,13 +12870,13 @@ chown: change ownership of multiple directories recursively in relative path without globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -13462,8 +13498,8 @@ chgrp: change group of directory in relative path - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 @@ -13530,8 +13566,8 @@ chgrp: change group of directory in relative path recursively - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 @@ -13717,13 +13753,13 @@ chgrp: change group of multiple directories in relative path using globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -13893,13 +13929,13 @@ chgrp: change group of multiple directories in relative path without globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -14003,13 +14039,13 @@ chgrp: change group of multiple directories recursively in relative path using globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2 @@ -14113,13 +14149,13 @@ chgrp: change group of multiple directories recursively in relative path without globbing - -fs NAMENODE -mkdir dir0 - -fs NAMENODE -mkdir dir0/dir1 + -fs NAMENODE -mkdir -p dir0 + -fs NAMENODE -mkdir -p dir0/dir1 -fs NAMENODE -touchz dir0/file0 -fs NAMENODE -touchz dir0/dir1/file1 -fs NAMENODE -touchz dir0/dir1/file2 - -fs NAMENODE -mkdir dir2 - -fs NAMENODE -mkdir dir2/dir1 + -fs NAMENODE -mkdir -p dir2 + -fs NAMENODE -mkdir -p dir2/dir1 -fs NAMENODE -touchz dir2/file0 -fs NAMENODE -touchz dir2/dir1/file1 -fs NAMENODE -touchz dir2/dir1/file2