From 48a86fbe8f1de82c752debf32dd68290261c8ded Mon Sep 17 00:00:00 2001 From: Robert Joseph Evans Date: Thu, 19 Jul 2012 17:48:33 +0000 Subject: [PATCH] svn merge -c 1363435 FIXES: HADOOP-8551. fs -mkdir creates parent directories without the -p option (Daryn Sharp and John George via bobby) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1363437 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop-common/CHANGES.txt | 3 + .../org/apache/hadoop/fs/shell/Mkdir.java | 5 +- .../src/test/resources/testHDFSConf.xml | 343 +++++++++--------- 3 files changed, 187 insertions(+), 164 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index df664f6734d..2f3dd3746f1 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -654,6 +654,9 @@ Release 0.23.3 - UNRELEASED HADOOP-8599. Non empty response from FileSystem.getFileBlockLocations when asking for data beyond the end of file. (Andrey Klochkov via todd) + HADOOP-8551. fs -mkdir creates parent directories without the -p option + (Daryn Sharp and John George via bobby) + Release 0.23.2 - UNRELEASED NEW FEATURES 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 eb0fd22562f..02506872345 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 @@ -26,6 +26,7 @@ import org.apache.hadoop.classification.InterfaceStability; 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 +67,9 @@ class Mkdir extends FsCommand { @Override protected void processNonexistentPath(PathData item) throws IOException { - // TODO: should use createParents to control intermediate dir creation + if (!item.parentExists() && !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 cdd10bd5857..26bede595ed 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 @@ -5448,7 +5448,7 @@ mkdir: creating directory (relative path) - -fs NAMENODE -mkdir dir0 + -fs NAMENODE -mkdir -p dir0 -fs NAMENODE -du -s dir0 @@ -5497,10 +5497,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 +5547,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 +5721,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 +5759,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 +6356,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 +6416,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 +6518,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 +6605,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 +6776,7 @@ tail: contents of directory(relative path) - -fs NAMENODE -mkdir dir1 + -fs NAMENODE -mkdir -p dir1 -fs NAMENODE -tail dir1 @@ -6966,7 +6983,7 @@ count: directory using relative path - -fs NAMENODE -mkdir dir1 + -fs NAMENODE -mkdir -p dir1 -fs NAMENODE -count dir1 @@ -7173,10 +7190,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 +7254,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 +7339,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 +7556,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 +7636,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 +8499,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 +8611,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 +8679,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 +8747,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 +8966,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 +9142,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 +9318,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 +9494,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 +9604,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 +9714,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 +9824,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 +9934,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 +12200,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 +12268,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 +12455,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 +12631,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 +12741,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 +12851,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 +13479,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 +13547,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 +13734,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 +13910,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 +14020,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 +14130,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