diff --git a/CHANGES.txt b/CHANGES.txt index 6f4c6c2374..cf7ce4dd3b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -93,6 +93,9 @@ Trunk (unreleased changes) HADOOP-7014. Generalize CLITest structure and interfaces to facilitate upstream adoption (e.g. for web testing). (cos) + HADOOP-7230. Move "fs -help" shell command tests from HDFS to COMMOM; see + also HDFS-1844. (Daryn Sharp via szetszwo) + OPTIMIZATIONS BUG FIXES diff --git a/src/test/core/org/apache/hadoop/cli/testConf.xml b/src/test/core/org/apache/hadoop/cli/testConf.xml index 9ad40c7d8b..fd2bc8b2ce 100644 --- a/src/test/core/org/apache/hadoop/cli/testConf.xml +++ b/src/test/core/org/apache/hadoop/cli/testConf.xml @@ -44,5 +44,740 @@ + + help: help for ls + + -help ls + + + + + + RegexpComparator + ^-ls <path>:( |\t)*List the contents that match the specified file pattern. If( )* + + + RegexpComparator + ^( |\t)*path is not specified, the contents of /user/<currentUser>( )* + + + RegexpComparator + ^( |\t)*path is not specified, the contents of /user/<currentUser>( )* + + + RegexpComparator + ^( |\t)*will be listed. Directory entries are of the form( )* + + + RegexpComparator + ^( |\t)*dirName \(full path\) <dir>( )* + + + RegexpComparator + ^( |\t)*and file entries are of the form( )* + + + RegexpComparator + ^( |\t)*fileName\(full path\) <r n> size( )* + + + RegexpComparator + ^( |\t)*where n is the number of replicas specified for the file( )* + + + RegexpComparator + ^( |\t)*and size is the size of the file, in bytes.( )* + + + + + + help: help for lsr + + -help lsr + + + + + + RegexpComparator + ^-lsr <path>:( |\t)*Recursively list the contents that match the specified( )* + + + RegexpComparator + ^( |\t)*file pattern.( |\t)*Behaves very similarly to hadoop fs -ls,( )* + + + RegexpComparator + ^( |\t)*except that the data is shown for all the entries in the( )* + + + RegexpComparator + ^( |\t)*subtree.( )* + + + + + + help: help for get + + -help get + + + + + + + RegexpComparator + ^-get( )*\[-ignoreCrc\]( )*\[-crc\]( )*<src> <localdst>:( |\t)*Copy files that match the file pattern <src>( )* + + + RegexpComparator + ^( |\t)*to the local name.( )*<src> is kept.( )*When copying mutiple,( )* + + + RegexpComparator + ^( |\t)*files, the destination must be a directory.( )* + + + + + + help: help for du + + -help du + + + + + + RegexpComparator + ^-du \[-s\] \[-h\] <path>:\s+Show the amount of space, in bytes, used by the files that\s* + + + RegexpComparator + ^\s*match the specified file pattern. The following flags are optional: + + + RegexpComparator + ^\s*-s\s*Rather than showing the size of each individual file that + + + RegexpComparator + ^\s*matches the pattern, shows the total \(summary\) size. + + + RegexpComparator + ^\s*-h\s*Formats the sizes of files in a human-readable fashion + + + RegexpComparator + \s*rather than a number of bytes. + + + RegexpComparator + ^\s*Note that, even without the -s option, this only shows size summaries + + + RegexpComparator + ^\s*one level deep into a directory. + + + RegexpComparator + ^\s*The output is in the form + + + RegexpComparator + ^\s*size\s+name\(full path\)\s* + + + + + + help: help for dus + + -help dus + + + + + + RegexpComparator + ^-dus <path>:( |\t)*Show the amount of space, in bytes, used by the files that( )* + + + RegexpComparator + ^( |\t)*match the specified file pattern. This is equivalent to -du -s above. + + + + + + help: help for count + + -help count + + + + + + RegexpComparator + ^-count\[-q\] <path>: Count the number of directories, files and bytes under the paths( )* + + + RegexpComparator + ^( |\t)*that match the specified file pattern. The output columns are:( )* + + + RegexpComparator + ^( |\t)*DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME or( )* + + + RegexpComparator + ^( |\t)*QUOTA REMAINING_QUATA SPACE_QUOTA REMAINING_SPACE_QUOTA( )* + + + RegexpComparator + ^( |\t)*DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME( )* + + + + + + help: help for mv + + -help mv + + + + + + RegexpComparator + ^-mv <src> <dst>:( |\t)*Move files that match the specified file pattern <src>( )* + + + RegexpComparator + ^( |\t)*to a destination <dst>. When moving multiple files, the( )* + + + RegexpComparator + ^( |\t)*destination must be a directory.( )* + + + + + + help: help for cp + + -help cp + + + + + + RegexpComparator + ^-cp <src> <dst>:( |\t)*Copy files that match the file pattern <src> to a( )* + + + RegexpComparator + ^( |\t)*destination. When copying multiple files, the destination( )* + + + RegexpComparator + ^( |\t)*must be a directory.( )* + + + + + + help: help for rm + + -help rm + + + + + + RegexpComparator + ^-rm \[-skipTrash\] <src>:( |\t)*Delete all files that match the specified file pattern.( )* + + + RegexpComparator + ^( |\t)*Equivalent to the Unix command "rm <src>"( )* + + + RegexpComparator + ^( |\t)*-skipTrash option bypasses trash, if enabled, and immediately( )* + + + RegexpComparator + ^( |\t)*deletes <src>( )* + + + + + + help: help for rmr + + -help rmr + + + + + + RegexpComparator + ^-rmr \[-skipTrash\] <src>:( |\t)*Remove all directories which match the specified file( )* + + + RegexpComparator + ^( |\t)*pattern. Equivalent to the Unix command "rm -rf <src>"( )* + + + RegexpComparator + ^( |\t)*-skipTrash option bypasses trash, if enabled, and immediately( )* + + + RegexpComparator + ^( |\t)*deletes <src>( )* + + + + + + help: help for put + + -help put + + + + + + RegexpComparator + ^-put <localsrc> ... <dst>:( |\t)*Copy files from the local file system( )* + + + RegexpComparator + ^( |\t)*into fs.( )* + + + + + + help: help for copyFromLocal + + -help copyFromLocal + + + + + + RegexpComparator + ^-copyFromLocal <localsrc> ... <dst>:( )*Identical to the -put command.( )* + + + + + + help: help for moveFromLocal + + -help moveFromLocal + + + + + + RegexpComparator + ^-moveFromLocal <localsrc> ... <dst>: Same as -put, except that the source is( )* + + + RegexpComparator + ^( |\t)*deleted after it's copied.( )* + + + + + + help: help for get + + -help get + + + + + + + RegexpComparator + ^-get( )*\[-ignoreCrc\]( )*\[-crc\]( )*<src> <localdst>:( |\t)*Copy files that match the file pattern <src>( )* + + + RegexpComparator + ^( |\t)*to the local name.( )*<src> is kept.( )*When copying mutiple,( )* + + + RegexpComparator + ^( |\t)*files, the destination must be a directory.( )* + + + + + + help: help for getmerge + + -help getmerge + + + + + + RegexpComparator + ^-getmerge <src> <localdst>: Get all the files in the directories that( )* + + + RegexpComparator + ^( |\t)*match the source file pattern and merge and sort them to only( )* + + + RegexpComparator + ^( |\t)*one file on local fs. <src> is kept.( )* + + + + + + help: help for cat + + -help cat + + + + + + + RegexpComparator + ^-cat <src>:( |\t)*Fetch all files that match the file pattern <src>( )* + + + RegexpComparator + ^( |\t)*and display their content on stdout. + + + + + + help: help for copyToLocal + + -help copyToLocal + + + + + + RegexpComparator + ^-copyToLocal \[-ignoreCrc\] \[-crc\] <src> <localdst>:( )*Identical to the -get command.( )* + + + + + + help: help for moveToLocal + + -help moveToLocal + + + + + + RegexpComparator + ^-moveToLocal <src> <localdst>:( )*Not implemented yet( )* + + + + + + help: help for mkdir + + -help mkdir + + + + + + RegexpComparator + ^-mkdir <path>:( |\t)*Create a directory in specified location.( )* + + + + + + help: help for setrep + + -help setrep + + + + + + RegexpComparator + ^-setrep \[-R\] \[-w\] <rep> <path/file>:( )*Set the replication level of a file.( )* + + + RegexpComparator + ^( |\t)*The -R flag requests a recursive change of replication level( )* + + + RegexpComparator + ^( |\t)*for an entire tree.( )* + + + + + + help: help for touchz + + -help touchz + + + + + + RegexpComparator + ^-touchz <path>: Creates a file of zero length( )* + + + RegexpComparator + ^( |\t)*at <path> with current time as the timestamp of that <path>.( )* + + + RegexpComparator + ^( |\t)* An error is returned if the file exists with non-zero length( )* + + + + + + help: help for test + + -help test + + + + + + RegexpComparator + ^-test -\[ezd\] <path>: If file \{ exists, has zero length, is a directory( )* + + + RegexpComparator + ^( |\t)*then return 0, else return 1.( )* + + + + + + help: help for stat + + -help stat + + + + + + RegexpComparator + ^-stat \[format\] <path>: Print statistics about the file/directory at <path>( )* + + + RegexpComparator + ^( |\t)*in the specified format. Format accepts filesize in blocks \(%b\), filename \(%n\),( )* + + + RegexpComparator + ^( |\t)*block size \(%o\), replication \(%r\), modification date \(%y, %Y\)( )* + + + + + + help: help for tail + + -help tail + + + + + + RegexpComparator + ^-tail \[-f\] <file>: Show the last 1KB of the file.( )* + + + RegexpComparator + ^( |\t)*The -f option shows apended data as the file grows.( )* + + + + + + help: help for chmod + + -help chmod + + + + + + RegexpComparator + ^-chmod \[-R\] <MODE\[,MODE\]... \| OCTALMODE> PATH...( )* + + + RegexpComparator + ^( |\t)*Changes permissions of a file.( )* + + + RegexpComparator + ^( |\t)*This works similar to shell's chmod with a few exceptions.( )* + + + RegexpComparator + ^( |\t)*-R( |\t)*modifies the files recursively. This is the only option( )* + + + RegexpComparator + ^( |\t)*currently supported.( )* + + + RegexpComparator + ^( |\t)*MODE( |\t)*Mode is same as mode used for chmod shell command.( )* + + + RegexpComparator + ^( |\t)*Only letters recognized are 'rwxXt'. E.g. \+t,a\+r,g-w,\+rwx,o=r( )* + + + RegexpComparator + ^( |\t)*OCTALMODE Mode specifed in 3 or 4 digits. If 4 digits, the first may( )* + + + RegexpComparator + ^( |\t)*be 1 or 0 to turn the sticky bit on or off, respectively.( )*Unlike( |\t)*shell command, it is not possible to specify only part of the mode( )* + + + RegexpComparator + ^( |\t)*E.g. 754 is same as u=rwx,g=rx,o=r( )* + + + RegexpComparator + ^( |\t)*If none of 'augo' is specified, 'a' is assumed and unlike( )* + + + RegexpComparator + ^( |\t)*shell command, no umask is applied.( )* + + + + + + help: help for chown + + -help chown + + + + + + RegexpComparator + ^-chown \[-R\] \[OWNER\]\[:\[GROUP\]\] PATH...( )* + + + RegexpComparator + ^( |\t)*Changes owner and group of a file.( )* + + + RegexpComparator + ^( |\t)*This is similar to shell's chown with a few exceptions.( )* + + + RegexpComparator + ^( |\t)*-R( |\t)*modifies the files recursively. This is the only option( )* + + + RegexpComparator + ^( |\t)*currently supported.( )* + + + RegexpComparator + ^( |\t)*If only owner or group is specified then only owner or( )* + + + RegexpComparator + ^( |\t)*group is modified.( )* + + + RegexpComparator + ^( |\t)*The owner and group names may only cosists of digits, alphabet,( )* + + + RegexpComparator + ^( |\t)*and any of '-_.@/' i.e. \[-_.@/a-zA-Z0-9\]. The names are case( )* + + + RegexpComparator + ^( |\t)*sensitive.( )* + + + RegexpComparator + ^( |\t)*WARNING: Avoid using '.' to separate user name and group though( )* + + + RegexpComparator + ^( |\t)*Linux allows it. If user names have dots in them and you are( )* + + + RegexpComparator + ^( |\t)*using local file system, you might see surprising results since( )* + + + RegexpComparator + ^( |\t)*shell command 'chown' is used for local files.( )* + + + + + + help: help for chgrp + + -help chgrp + + + + + + RegexpComparator + ^-chgrp \[-R\] GROUP PATH...( )* + + + RegexpComparator + ^( |\t)*This is equivalent to -chown ... :GROUP ...( )* + + + + + + help: help for help + + -help help + + + + + + RegexpComparator + ^-help \[cmd\]:( |\t)*Displays help for given command or all commands if none( )* + + + RegexpComparator + ^( |\t)*is specified.( )* + + + +