| <?xml version="1.0" encoding="UTF-8"?> |
| <?xml-stylesheet type="text/xsl" href="testConf.xsl"?> |
| |
| <configuration> |
| <!-- Normal mode is test. To run just the commands and dump the output |
| to the log, set it to nocompare --> |
| <mode>test</mode> |
| |
| <!-- Comparator types: |
| ExactComparator |
| SubstringComparator |
| RegexpComparator |
| TokenComparator |
| --> |
| <tests> |
| <!-- Tests for ls --> |
| <test> <!-- TESTED --> |
| <description>ls: file using absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -ls /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: file using relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -ls file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -ls file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: directory using absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <command>-fs NAMENODE -ls /</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: directory using relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir1</command> |
| <command>-fs NAMENODE -ls </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: directory using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir1</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir3</command> |
| <command>-fs NAMENODE -mkdir dir4</command> |
| <command>-fs NAMENODE -ls </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: file/directory that does not exist in /</description> |
| <test-commands> |
| <command>-fs NAMENODE -ls /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^ls: Cannot access /file1: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: file/directory that does not exist in home directory (/user/username)</description> |
| <test-commands> |
| <command>-fs NAMENODE -ls /user</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^ls: Cannot access /user: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: Non-URI input file at Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -ls NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: file at hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -ls hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: Non-URI input file at Namenode's path using globing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -ls NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: file at hdfs:// path using globing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -ls hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: Non-URI input dir at Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/user/dir1</command> |
| <command>-fs NAMENODE -ls hdfs:///user/</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///user/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Found [0-9] items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: dir at hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///user/dir1</command> |
| <command>-fs NAMENODE -ls hdfs:///user/</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///user/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Found [0-9] items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: Non-URI input dir at Namenode's path using globing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/user/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/user/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/user/dir3</command> |
| <command>-fs NAMENODE -ls hdfs:///user/</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///user/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Found [0-9] items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: dir at hdfs:// path using globing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///user/dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///user/dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///user/dir3</command> |
| <command>-fs NAMENODE -ls hdfs:///user/</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///user/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Found [0-9] items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: non-existent file/directory at hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -ls hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- no cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^ls: Cannot access hdfs:///file1: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>ls: non-existent file/directory in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -ls NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- no cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^ls: Cannot access hdfs://localhost[.a-z]*:[0-9]+/file1: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for lsr --> |
| <test> <!-- TESTED --> |
| <description>lsr: files/directories using absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir2</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -touchz /dir0/dir2/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir2/file2</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file2</command> |
| <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file2</command> |
| <command>-fs NAMENODE -lsr /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>lsr: files/directories using relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command> |
| <command>-fs NAMENODE -mkdir dir0/dir2</command> |
| <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command> |
| <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -touchz dir0/dir2/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir2/file2</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command> |
| <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command> |
| <command>-fs NAMENODE -lsr dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>lsr: files/directories using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command> |
| <command>-fs NAMENODE -mkdir dir0/dir2</command> |
| <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command> |
| <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -touchz dir0/dir2/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir2/file2</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command> |
| <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command> |
| <command>-fs NAMENODE -lsr dir0/*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <!-- JIRA? |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^/user/[a-z]*/dir0/dir2</expected-output> |
| </comparator> |
| --> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>lsr: file/directory that does not exist in /</description> |
| <test-commands> |
| <command>-fs NAMENODE -lsr /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^lsr: Cannot access /file1: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>lsr: file/directory that does not exist in home directory (/user/username)</description> |
| <test-commands> |
| <command>-fs NAMENODE -lsr /user</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^lsr: Cannot access /user: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>lsr: dir at hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -lsr hdfs:///</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///dir0</command> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>lsr: files/directories in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir0/*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>lsr: Non-existent file/directory in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -lsr hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^lsr: Cannot access hdfs:///file1: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>lsr: dir at Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///dir0</command> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>lsr: Non-URI input files/directories in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir0/*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>lsr: Non-URI input for non-existent file/directory in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -lsr NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^lsr: Cannot access hdfs://localhost[.a-z]*:[0-9]+/file1: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>lsr: Test for /*/* globbing </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -lsr /\*/\*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for du --> |
| <test> <!-- TESTED --> |
| <description>du: file using absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command> |
| <command>-fs NAMENODE -du /data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: file using relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command> |
| <command>-fs NAMENODE -du data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command> |
| <command>-fs NAMENODE -du data*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 4 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: directory using absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command> |
| <command>-fs NAMENODE -du /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: directory using relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command> |
| <command>-fs NAMENODE -du dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: directory using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command> |
| <command>-fs NAMENODE -du /dir0/*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 4 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: Test for hdfs:// path - file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command> |
| <command>-fs NAMENODE -du hdfs:///data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: Test for hdfs:// path - files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///data120bytes</command> |
| <command>-fs NAMENODE -du hdfs:///data*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 4 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: Test for hdfs:// path - directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command> |
| <command>-fs NAMENODE -du hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>duh: Test for hdfs:// path - directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data1k hdfs:///dir0/data1k</command> |
| <command>-fs NAMENODE -du -h hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 2 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^1.0k( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data1k</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: Test for hdfs:// path - directory using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command> |
| <command>-fs NAMENODE -du hdfs:///dir0/*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 4 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: Test for Namenode's path - file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command> |
| <command>-fs NAMENODE -du NAMENODE/data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: Test for Namenode's path - files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/data120bytes</command> |
| <command>-fs NAMENODE -du NAMENODE/data*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 4 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: Test for Namenode's path - directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command> |
| <command>-fs NAMENODE -du NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>du: Test for Namenode's path - directory using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command> |
| <command>-fs NAMENODE -du NAMENODE/dir0/*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 4 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for dus --> |
| <test> <!-- TESTED --> |
| <description>dus: directories/files using absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir2</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command> |
| <command>-fs NAMENODE -dus /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^450\s+hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>dus: directories/files using relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command> |
| <command>-fs NAMENODE -mkdir dir0/dir2</command> |
| <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command> |
| <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir1/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir2/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir2/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir1/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir1/dir2/data120bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir2/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir2/dir2/data120bytes</command> |
| <command>-fs NAMENODE -dus dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^450\s+hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>dus: directories/files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir2</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command> |
| <command>-fs NAMENODE -mkdir /donotcountdir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -dus /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| <command>-fs NAMENODE -rmr /donotcountdir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^450\s+hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for dus --> |
| <test> <!-- TESTED --> |
| <description>dus: Test for hdfs:// path - directories/files</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir2</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir1/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir2/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir2/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir1/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir1/dir2/data120bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir2/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir2/dir2/data120bytes</command> |
| <command>-fs NAMENODE -dus hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^450\s+hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>dus: Test for hdfs:// path - directories/files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir2</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir1/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir2/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir2/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir1/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir1/dir2/data120bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir2/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir2/dir2/data120bytes</command> |
| <command>-fs NAMENODE -mkdir /donotcountdir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -dus hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| <command>-fs NAMENODE -rmr hdfs:///donotcountdir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^450\s+hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>dus: Test for Namenode's path - directories/files</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir1/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir2/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir2/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir1/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir1/dir2/data120bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir2/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir2/dir2/data120bytes</command> |
| <command>-fs NAMENODE -dus NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^450\s+hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>dus: Test for Namenode's path - directories/files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir1/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir2/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir2/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir1/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir1/dir2/data120bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir2/dir1/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir2/dir2/data120bytes</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/donotcountdir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command> |
| <command>-fs NAMENODE -dus NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| <command>-fs NAMENODE -rmr NAMENODE/donotcountdir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^450\s+hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for mv --> |
| <test> <!-- TESTED --> |
| <description>mv: file (absolute path) to file (absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -mv /file1 /file2</command> |
| <command>-fs NAMENODE -ls /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file2</command> |
| </cleanup-commands>: |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file[^1]</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: file (absolute path) to file (relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -mv /file1 file2</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^mv: Failed to rename hdfs://localhost[.a-z]*:[0-9]*/file1 to file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mv /file1 /dir0</command> |
| <command>-fs NAMENODE -lsr /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination [ TIED to previous test ]</description> |
| <test-commands> |
| <command>-fs NAMENODE -ls /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>ls: Cannot access /file1: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: file (absolute path) to directory (absolute path); change the name at the destination</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mv /file1 /dir0/file2</command> |
| <command>-fs NAMENODE -ls /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: file (absolute path) to directory (absolute path); change the name at the destination [ TIED to previous test ]</description> |
| <test-commands> |
| <command>-fs NAMENODE -ls /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>ls: Cannot access /file1: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: files (absolute path) to directory (absolute path) using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mv /file* /dir0</command> |
| <command>-fs NAMENODE -lsr /*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: files (absolute path) to directory (absolute path) using globbing [ TIED to previous test ]</description> |
| <test-commands> |
| <command>-fs NAMENODE -ls /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>ls: Cannot access /file*: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: file (relative) to file (relative)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -mv file1 file2</command> |
| <command>-fs NAMENODE -ls file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file[^1]</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving file to file(rename in for hdfs:// path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///file2</command> |
| <command>-fs NAMENODE -ls hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file2</command> |
| </cleanup-commands>: |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file[^1]</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving file to directory (keep the same name at the destination) in hdfs:// path - </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///dir0</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving files to directory in hdfs:// path - [ TIED to previous test ]</description> |
| <test-commands> |
| <command>-fs NAMENODE -ls hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>ls: Cannot access hdfs:///file*: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving file that does not exist in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///file2</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>mv: hdfs:/file1: No such file or directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving file to directory (different name at the destination) in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///dir0/file2</command> |
| <command>-fs NAMENODE -ls hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving file to directory (different name at the destination) in hdfs:// path [ TIED to previous test ]</description> |
| <test-commands> |
| <command>-fs NAMENODE -ls hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>ls: Cannot access hdfs:///file1: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving group of files to directory using globbing in hdfs:// path - </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mv hdfs:///file* hdfs:///dir0</command> |
| <command>-fs NAMENODE -lsr hdfs:///*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving files to directory using globbing in hdfs:// [ TIED to previous test ]</description> |
| <test-commands> |
| <command>-fs NAMENODE -ls hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>ls: Cannot access hdfs:///file*: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving file to file(rename) in Namenode's path - </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/file2</command> |
| <command>-fs NAMENODE -ls NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file2</command> |
| </cleanup-commands>: |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file[^1]</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving file to directory (keep the same name at the destination) in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/dir0</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving files to directory in Namenode's path - [ TIED to previous test ]</description> |
| <test-commands> |
| <command>-fs NAMENODE -ls NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^ls: Cannot access hdfs:\/\/localhost[.a-z]*:[0-9]+\/file1: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving file that does not exist in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/file2</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^mv: hdfs://localhost[.a-z]*:[0-9]+/file1: No such file or directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving file to directory (different name at the destination) in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/dir0/file2</command> |
| <command>-fs NAMENODE -ls NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving file to directory (different name at the destination) in Namenode's path [ TIED to previous test ]</description> |
| <test-commands> |
| <command>-fs NAMENODE -ls NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^ls: Cannot access hdfs:\/\/localhost[.a-z]*:[0-9]+\/file1: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving group of files to directory using globbing in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mv NAMENODE/file* NAMENODE/dir0</command> |
| <command>-fs NAMENODE -lsr NAMENODE/*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving files to directory using globbing in Namenode's path [ TIED to previous test ]</description> |
| <test-commands> |
| <command>-fs NAMENODE -ls NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^ls: Cannot access hdfs:\/\/localhost[.a-z]*:[0-9]+\/file\*: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving directory to directory in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command> |
| <command>-fs NAMENODE -mv hdfs:///dir0 hdfs:///dir1</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mv: moving directory to directory in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command> |
| <command>-fs NAMENODE -mv NAMENODE/dir0 NAMENODE/dir1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for cp--> |
| <test> <!-- TESTED --> |
| <description>cp: file (absolute path) to file (absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -cp /file1 /file2</command> |
| <command>-fs NAMENODE -ls /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file*</command> |
| </cleanup-commands>: |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: file (absolute path) to file (relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -cp /file1 file2</command> |
| <command>-fs NAMENODE -ls /file1 file2</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /file1 file2</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: file (relative path) to file (absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -cp file1 /file2</command> |
| <command>-fs NAMENODE -ls file1 /file2</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr file1 /file2</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: file (relative path) to file (relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -cp file1 file2</command> |
| <command>-fs NAMENODE -ls file1 file2</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr file1 file2</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: file (absolute path) to directory (absolute path); keep the same name at the destination</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -cp /file1 /dir0</command> |
| <command>-fs NAMENODE -ls /file1 /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: file (absolute path) to directory (absolute path); change the name at the destination</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -cp /file1 /dir0/file2</command> |
| <command>-fs NAMENODE -ls /file1 /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: files to directory (absolute path) using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -cp /file* /dir0</command> |
| <command>-fs NAMENODE -lsr /*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: files to directory (absolute path) without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /dir0</command> |
| <command>-fs NAMENODE -lsr /*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying non existent file (absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -cp /file /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands>: |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: File does not exist: /file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying non existent file (relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -cp file1 file2</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands>: |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: File does not exist: file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: files to an existent file using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -touchz /file5</command> |
| <command>-fs NAMENODE -cp /file* /file5</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: files to an existent file without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -touchz /file5</command> |
| <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /file5</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination /file5 should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: files to a non existent directory using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -cp /file* dir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: files to a non existent directory without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 dir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination dir should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: file to file copy in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2</command> |
| <command>-fs NAMENODE -ls hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file*</command> |
| </cleanup-commands>: |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: file to directory copy (same name at the destination) in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///dir0</command> |
| <command>-fs NAMENODE -ls hdfs:///file1 hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0/ hdfs://file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: file to directory (different name at the destination) in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///dir0/file2</command> |
| <command>-fs NAMENODE -ls hdfs:///file1 hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0/</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: files to directory using globbing in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -cp hdfs:///file* hdfs:///dir0</command> |
| <command>-fs NAMENODE -lsr hdfs:///*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///file*</command> |
| <command>-fs NAMENODE -rmr hdfs:///dir0/</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: files to directory in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///dir0</command> |
| <command>-fs NAMENODE -lsr hdfs:///*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///file*</command> |
| <command>-fs NAMENODE -rmr hdfs:///dir0/</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying non existent file in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -cp hdfs:///file hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands>: |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: File does not exist: hdfs:/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying files to an existent file in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -touchz hdfs:///file5</command> |
| <command>-fs NAMENODE -cp hdfs:///file* hdfs:///file5</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying files to an existent file in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -touchz hdfs:///file5</command> |
| <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 hdfs:///file5</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination hdfs:///file5 should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying files to a non existent directory in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -cp hdfs:///file* hdfs:///dir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying files to a non existent directory in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 hdfs:///dir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination hdfs:///dir should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying non existent directory in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMNEODE -rmr hdfs:///dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: File does not exist: hdfs:/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying directory to directory in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command> |
| <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying multiple directories to directory using globbing in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dest</command> |
| <command>-fs NAMENODE -cp hdfs:///dir* hdfs:///dest</command> |
| <command>-fs NAMENODE -lsr hdfs:///d*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMNEODE -rmr hdfs:///d*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying multiple directories to directory in hdfs:// path without using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dest</command> |
| <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dest</command> |
| <command>-fs NAMENODE -lsr hdfs:///d*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMNEODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: file to file copy in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2</command> |
| <command>-fs NAMENODE -ls NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file*</command> |
| </cleanup-commands>: |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: file to directory copy (same name at the destination) in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/dir0</command> |
| <command>-fs NAMENODE -ls NAMENODE/file1 NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0/ NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: file to directory (different name at the destination) in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/dir0/file2</command> |
| <command>-fs NAMENODE -ls NAMENODE/file1 NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0/</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: files to directory in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/dir0</command> |
| <command>-fs NAMENODE -lsr NAMENODE/*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/file*</command> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0/</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: files to directory in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/dir0</command> |
| <command>-fs NAMENODE -lsr NAMENODE/*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/file*</command> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0/</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying non existent file in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -cp NAMENODE/file NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands>: |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: File does not exist: hdfs://localhost[.a-z]*:[0-9]+/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying files to an existent file in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file5</command> |
| <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/file5</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying files to an existent file in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file5</command> |
| <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 NAMENODE/file5</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination hdfs://localhost[.a-z]*:[0-9]+/file5 should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying files to a non existent directory in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/dir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying files to a non existent directory in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 NAMENODE/dir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cp: When copying multiple files, destination hdfs://localhost[.a-z]*:[0-9]+/dir should be a directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying directory to directory in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command> |
| <command>-fs NAMENODE -cp NAMENODE/dir0 NAMENODE/dir1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying multiple directories to directory in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dest</command> |
| <command>-fs NAMENODE -cp NAMENODE/dir* NAMENODE/dest</command> |
| <command>-fs NAMENODE -lsr NAMENODE/d*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMNEODE -rmr NAMENODE/d*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cp: copying multiple directories to directory in Namenode's path without using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dest</command> |
| <command>-fs NAMENODE -cp NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dest</command> |
| <command>-fs NAMENODE -lsr NAMENODE/d*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMNEODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dest/dir2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for rm --> |
| <test> <!-- TESTED --> |
| <description>rm: removing a file (absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -rm /dir0/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing a file (relative path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file0</command> |
| <command>-fs NAMENODE -rm file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing files by globbing (absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/file2</command> |
| <command>-fs NAMENODE -touchz /dir0/file3</command> |
| <command>-fs NAMENODE -rm /dir0/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing files by globbing (relative path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file0</command> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -rm file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing a directory (absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE mkdir /dir0</command> |
| <command>-fs NAMENODE -rm /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^rm: Cannot remove directory "hdfs://localhost[.a-z]*:[0-9]*/dir0", use -rmr instead</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing a directory (relative path) </description> |
| <test-commands> |
| <command>-fs NAMENODE mkdir dir0</command> |
| <command>-fs NAMENODE -rm dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^rm: cannot remove dir0: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing a nonexistent file (absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -rm /dir0/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^rm: cannot remove /dir0/file0: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing a nonexistent file (relative path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -rm file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^rm: cannot remove file0: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing a file in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file0</command> |
| <command>-fs NAMENODE -rm hdfs:///file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing files by globbing in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -rm hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing a directory in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -rm hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^rm: Cannot remove directory "hdfs://localhost[.a-z]*:[0-9]*/dir0", use -rmr instead</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing a nonexistent file or dirctory in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -rm hdfs:///file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^rm: cannot remove hdfs:/file0: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing files without globbing in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -rm hdfs:///file0 hdfs:///file1 hdfs:///file2 hdfs:///file3</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing a file in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file0</command> |
| <command>-fs NAMENODE -rm NAMENODE/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing files by globbing in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -rm NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing a directory in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -rm NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>rm: cannot remove hdfs://localhost[.a-z]*:[0-9]*/dir0: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| |
| <test> <!-- TESTED --> |
| <description>rm: removing a nonexistent file or directory in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^rm: cannot remove hdfs://localhost[.a-z]*:[0-9]*/file0: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rm: Tremoving files without globbing in Namenode path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -rm NAMENODE/file0 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!--Tests for rmr--> |
| <test> <!-- TESTED --> |
| <description>rmr: removing a file (absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -rmr /dir0/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing a file (relative path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file0</command> |
| <command>-fs NAMENODE -rmr file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing a directory (absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /dir0</command> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing a directory (relative path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -rmr dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing directories by globbing (absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir3</command> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing directories by globbing (relative path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir1</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir3</command> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--TESTED--> |
| <description>rmr: removing a nonexistent file (absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -rmr /dir0/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^rmr: cannot remove /dir0/file0: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing a nonexistent file (relative path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -rmr file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^rmr: cannot remove file0: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing a file in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file0</command> |
| <command>-fs NAMENODE -rmr hdfs:///file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing a directory in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///dir0</command> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing directories by globbing in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir3</command> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--TESTED--> |
| <description>rmr: removing a nonexistent file or directory in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -rmr hdfs:///file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^rmr: cannot remove hdfs:/file0: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing directories without globbing in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir3</command> |
| <command>-fs NAMENODE -rmr hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dir3</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: Test for Namenode's path - removing a file</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file0</command> |
| <command>-fs NAMENODE -rmr NAMENODE/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: Test for Namenode's path - removing a directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0</command> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing directories by globbing in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir3</command> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--TESTED--> |
| <description>rmr: removing a nonexistent file or directory in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^rmr: cannot remove hdfs://localhost[.a-z]*:[0-9]*/file0: No such file or directory.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>rmr: removing directories without globbing in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir3</command> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for expunge --> |
| <!-- Not yet implemented --> |
| |
| <!-- Tests for put --> |
| <test> <!-- TESTED --> |
| <description>put: putting file into a file (absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command> |
| <command>-fs NAMENODE -du /data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting file into a file (relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command> |
| <command>-fs NAMENODE -du data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting file into a directory(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA /dir0/dir1/data</command> |
| <command>-fs NAMENODE -du /dir0/dir1/data</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/dir1/data/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/dir1/data/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/dir1/data/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/dir1/data/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting file into a directory(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA dir0/dir1/data</command> |
| <command>-fs NAMENODE -du dir0/dir1/data</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/dir1/data/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/dir1/data/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/dir1/data/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/dir1/data/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting many files into an existing directory(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command> |
| <command>-fs NAMENODE -du /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 2 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting many files into an existing directory(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command> |
| <command>-fs NAMENODE -du dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 2 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/data30bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting non existent file(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put /user/wrongdata file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>put: File /user/wrongdata does not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting non existent file(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put wrongdata file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>put: File wrongdata does not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting file into an already existing destination(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /user/file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>put: Target /user/file0 already exists</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting file into an already existing destination(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>put: Target file0 already exists</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting many files into an existing file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command> |
| <command>-fs NAMENODE -touchz file0</command> |
| <command>-fs NAMENODE -put /data15bytes /data30bytes file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^put: copying multiple files, but last argument `file0' is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting many files into a non existent directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command> |
| <command>-fs NAMENODE -put /data15bytes /data30bytes wrongdir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^put: `wrongdir': specified destination directory doest not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting a local file into hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command> |
| <command>-fs NAMENODE -du hdfs:///data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting file into a directory in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA hdfs:///dir1/data</command> |
| <command>-fs NAMENODE -du hdfs:///dir1/data</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir1/data</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir1/data/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir1/data/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir1/data/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir1/data/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting many local files into an existing directory in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///dir0</command> |
| <command>-fs NAMENODE -du hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 2 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting non existent file in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -put /user/wrongdata hdfs:///file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>put: File /user/wrongdata does not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting local file into an already existing destination in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///user/file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///user/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>put: Target hdfs:/user/file0 already exists</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting many local files into an existing file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^put: copying multiple files, but last argument `hdfs:/file0' is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting file into a non existent directory in hdfs:// path </description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^put: `hdfs:/wrongdir': specified destination directory doest not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting a local file into in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command> |
| <command>-fs NAMENODE -du NAMENODE/data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting file into a directory in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA NAMENODE/dir1/data</command> |
| <command>-fs NAMENODE -du NAMENODE/dir1/data</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir1/data</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir1/data/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir1/data/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir1/data/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir1/data/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting many local files into an existing directory in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/dir0</command> |
| <command>-fs NAMENODE -du NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 2 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting non existent file in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -put /user/wrongdata NAMENODE/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^put: File /user/wrongdata does not exist.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting local file into an already existing destination in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/user/file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/user/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^put: Target hdfs://localhost[.a-z]*:[0-9]+/user/file0 already exists</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting many local files into an existing file in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^put: copying multiple files, but last argument `hdfs://localhost[.a-z]*:[0-9]+/file0' is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>put: putting many files into a non existent directory in Namenode's path </description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^put: `hdfs://localhost[.a-z]*:[0-9]+/wrongdir': specified destination directory doest not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for copyFromLocal --> |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying file into a file (absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command> |
| <command>-fs NAMENODE -du /data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying file into a file (relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes data15bytes</command> |
| <command>-fs NAMENODE -du data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying file into a directory(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA /dir0/dir1/data</command> |
| <command>-fs NAMENODE -du /dir0/dir1/data</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/dir1/data/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/dir1/data/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/dir1/data/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/dir1/data/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying file into a directory(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA dir0/dir1/data</command> |
| <command>-fs NAMENODE -du dir0/dir1/data</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/dir1/data/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/dir1/data/data30bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/dir1/data/data60bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/dir1/data/data120bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying many files into an existing directory(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command> |
| <command>-fs NAMENODE -du /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 2 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying many files into an existing directory(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command> |
| <command>-fs NAMENODE -du dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 2 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/data30bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying non existent file(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal /user/wrongdata file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>copyFromLocal: File /user/wrongdata does not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying non existent file(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal wrongdata file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>copyFromLocal: File wrongdata does not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying file into an already existing destination(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /user/file0</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>copyFromLocal: Target /user/file0 already exists</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying file into an already existing destination(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file0</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>copyFromLocal: Target file0 already exists</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying many files into an existing file</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command> |
| <command>-fs NAMENODE -touchz file0</command> |
| <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^copyFromLocal: copying multiple files, but last argument `file0' is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: copying many files into a non existent directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command> |
| <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes wrongdir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^copyFromLocal: `wrongdir': specified destination directory doest not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for hdfs:// path - copying local file into a hdfs://file</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///data15bytes</command> |
| <command>-fs NAMENODE -du hdfs:///data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for hdfs:// path - copying local file into a hdfs directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/data</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data/</command> |
| <command>-fs NAMENODE -du hdfs:///dir0/dir1/data/data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/dir1/data/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for hdfs:// path copying many local files into an existing hdfs directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///dir0</command> |
| <command>-fs NAMENODE -du hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 2 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for hdfs:// path - copying non existent file</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal /user/wrongdata hdfs:///file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>copyFromLocal: File /user/wrongdata does not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for hdfs:// path - copying local file into an already existing destination</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///user/file0</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///user/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>copyFromLocal: Target hdfs:/user/file0 already exists</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for hdfs:// path - copying many local files into an existing file</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file0</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^copyFromLocal: copying multiple files, but last argument `hdfs:/file0' is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for hdfs:// path - copying many local files into a non existent directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^copyFromLocal: `hdfs:/wrongdir': specified destination directory doest not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for copyFromLocal using Namenode's path--> |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for Namenode's path - copying local file into a hdfs://file</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/data15bytes</command> |
| <command>-fs NAMENODE -du NAMENODE/data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for Namenode's path - copying local file into a hdfs directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/data</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data/</command> |
| <command>-fs NAMENODE -du NAMENODE/dir0/dir1/data/data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/dir1/data/data15bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for Namenode's path copying many local files into an existing hdfs directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/dir0</command> |
| <command>-fs NAMENODE -du NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 2 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for Namenode's path - copying non existent file</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal /user/wrongdata NAMENODE/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>copyFromLocal: File /user/wrongdata does not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for Namenode's path - copying local file into an already existing destination</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/user/file0</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/user/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>copyFromLocal: Target hdfs://localhost[.a-z]*:[0-9]+/user/file0 already exists</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for Namenode's path - copying many local files into an existing file</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file0</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^copyFromLocal: copying multiple files, but last argument `hdfs://localhost[.a-z]*:[0-9]+/file0' is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyFromLocal: Test for Namenode's path - copying many local files into a non existent directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^copyFromLocal: `hdfs://localhost[.a-z]*:[0-9]+/wrongdir': specified destination directory doest not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for get --> |
| <test> <!-- TESTED --> |
| <description>get: getting non existent(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -get /user/file CLITEST_DATA/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>get: null</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>get: getting non existent file(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -get file CLITEST_DATA/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>get: null</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>get: Test for hdfs:// path - getting non existent</description> |
| <test-commands> |
| <command>-fs NAMENODE -get hdfs:///user/file CLITEST_DATA/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>get: null</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>get: Test for Namenode's path - getting non existent</description> |
| <test-commands> |
| <command>-fs NAMENODE -get NAMENODE/user/file CLITEST_DATA/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>get: null</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for getmerge --> |
| <!-- Manual Testing --> |
| |
| <!-- Tests for cat --> |
| <test> <!-- TESTED --> |
| <description>cat: contents of file(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command> |
| <command>-fs NAMENODE -cat /data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>12345678901234</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>cat: contents of file(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command> |
| <command>-fs NAMENODE -cat data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>12345678901234</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: contents of files(absolute path) using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command> |
| <command>-fs NAMENODE -cat /dir0/data*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>12345678901234.*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED--> |
| <description>cat: contents of files(relative path) using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command> |
| <command>-fs NAMENODE -cat dir0/data*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>12345678901234.*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: contents of files(absolute path) without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command> |
| <command>-fs NAMENODE -cat /dir0/data15bytes /dir0/data30bytes /dir0/data60bytes /dir0/data120bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>12345678901234.*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED--> |
| <description>cat: contents of files(relative path) without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command> |
| <command>-fs NAMENODE -cat dir0/data15bytes dir0/data30bytes dir0/data60bytes dir0/data120bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>12345678901234.*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| |
| <test> <!-- TESTED --> |
| <description>cat: contents of file(absolute path) that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -cat /file</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cat: File does not exist: /file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: contents of file(relative path) that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -cat file</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cat: File does not exist: file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: contents of directory(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <command>-fs NAMENODE -cat /dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cat: Source must be a file.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: contents of directory(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir1</command> |
| <command>-fs NAMENODE -cat dir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cat: File does not exist: dir</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: Test for hdfs:// path - content of file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command> |
| <command>-fs NAMENODE -cat hdfs:///data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>12345678901234</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: Test for hdfs:// path - contents of files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command> |
| <command>-fs NAMENODE -cat hdfs:///dir0/data*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>12345678901234.*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: Test for hdfs:// path - contents of files without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command> |
| <command>-fs NAMENODE -cat hdfs:///dir0/data15bytes hdfs:///dir0/data30bytes hdfs:///dir0/data60bytes hdfs:///dir0/data120bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>12345678901234.*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: Test for hdfs:// path - contents of file that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -cat hdfs:///file</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cat: File does not exist: hdfs:/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: Test for hdfs:// path - contents of directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -cat hdfs:///dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cat: Source must be a file.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for cat using Namenode's path --> |
| <test> <!-- TESTED --> |
| <description>cat: Test for Namenode's path - content of file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command> |
| <command>-fs NAMENODE -cat NAMENODE/data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>12345678901234</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: Test for Namenode's path - contents of files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command> |
| <command>-fs NAMENODE -cat NAMENODE/dir0/data*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>12345678901234.*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: Test for Namenode's path - contents of files without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command> |
| <command>-fs NAMENODE -cat NAMENODE/dir0/data15bytes NAMENODE/dir0/data30bytes NAMENODE/dir0/data60bytes NAMENODE/dir0/data120bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>12345678901234.*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: Test for Namenode's path - contents of file that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -cat NAMENODE/file</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cat: File does not exist: hdfs://localhost[.a-z]*:[0-9]+/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>cat: Test for Namenode's path - contents of directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -cat NAMENODE/dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^cat: Source must be a file.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for copyToLocal --> |
| <test> <!-- TESTED --> |
| <description>copyToLocal: non existent relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyToLocal file CLITEST_DATA/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>copyToLocal: null</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyToLocal: non existent absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyToLocal /user/file CLITEST_DATA/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>copyToLocal: null</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyToLocal: Test for hdfs:// path - non existent file/directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyToLocal hdfs:///file CLITEST_DATA/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>copyToLocal: null</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>copyToLocal: Test for Namenode's path - non existent file/directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -copyToLocal NAMENODE/file CLITEST_DATA/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>copyToLocal: null</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for moveToLocal --> |
| <!-- Not yet implemented --> |
| |
| <!-- Tests for mkdir --> |
| <test> <!-- TESTED --> |
| <description>mkdir: creating directory (absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -dus /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: creating directory (relative path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0 </command> |
| <command>-fs NAMENODE -dus dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: creating many directories (absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0 </command> |
| <command>-fs NAMENODE -mkdir /dir1 </command> |
| <command>-fs NAMENODE -mkdir /dir2 </command> |
| <command>-fs NAMENODE -mkdir /dir3 </command> |
| <command>-fs NAMENODE -dus /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: creating many directories (relative path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0 </command> |
| <command>-fs NAMENODE -mkdir dir1 </command> |
| <command>-fs NAMENODE -mkdir dir2 </command> |
| <command>-fs NAMENODE -mkdir dir3 </command> |
| <command>-fs NAMENODE -dus dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: creating a directory with the name of an already existing directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>mkdir: cannot create directory /dir0: File exists</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: creating a directory with the name of an already existing file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command> |
| <command>-fs NAMENODE -mkdir data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>mkdir: data15bytes exists but is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: Test for hdfs:// path - creating directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -dus hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir0(|\t)*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: Test for hdfs:// path - creating many directories</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 </command> |
| <command>-fs NAMENODE -dus hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>mkdir: cannot create directory hdfs:///dir0: File exists</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command> |
| <command>-fs NAMENODE -mkdir hdfs:///data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>mkdir: hdfs:///data15bytes exists but is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: Test for Namenode's path - creating directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -dus NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: Test for Namenode's path - creating many directories</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3</command> |
| <command>-fs NAMENODE -dus NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0\s+hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: Test for NAMENODE path - creating a directory with the name of an already existing directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>mkdir: cannot create directory hdfs://localhost[.a-z]*:[0-9]+/dir0: File exists</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>mkdir: Test for Namenode's path - creating a directory with the name of an already existing file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>mkdir: hdfs://localhost[.a-z]*:[0-9]+/data15bytes exists but is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!--Tests for setrep--> |
| <test> <!-- TESTED --> |
| <description>setrep: existent file (absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -setrep 2 /dir0/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>setrep: existent file (relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file0</command> |
| <command>-fs NAMENODE -setrep 2 file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>setrep: existent directory (absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/file1</command> |
| <command>-fs NAMENODE -setrep -R 2 /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>setrep: existent directory (relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/file1</command> |
| <command>-fs NAMENODE -setrep -R 2 dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>setrep: non existent file (absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -setrep 2 /dir0/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^setrep: File does not exist: /dir0/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>setrep: non existent file (relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -setrep 2 file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^setrep: File does not exist: file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>setrep: Test for hdfs:// path - existent file</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>setrep: Test for hdfs:// path - existent directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command> |
| <command>-fs NAMENODE -setrep -R 2 hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>setrep: Test for hdfs:// path - non existent file</description> |
| <test-commands> |
| <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^setrep: File does not exist: hdfs:/dir0/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>setrep: Test for Namenode's path - existent file</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>setrep: Test for Namenode's path - existent directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command> |
| <command>-fs NAMENODE -setrep -R 2 NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>setrep: Test for Namenode's path - non existent file</description> |
| <test-commands> |
| <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^setrep: File does not exist: hdfs://localhost[.a-z]*:[0-9]+/dir0/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for touchz--> |
| <test> <!-- TESTED --> |
| <description>touchz: touching file (absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /user/file0</command> |
| <command>-fs NAMENODE -du /user/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>touchz: touching file(relative path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file0 </command> |
| <command>-fs NAMENODE -du file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>touchz: touching many files </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file0 file1 file2</command> |
| <command>-fs NAMENODE -du file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 3 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output> |
| <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file1</expected-output> |
| <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>touchz: touching already existing file </description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command> |
| <command>-fs NAMENODE -touchz data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>touchz: data15bytes must be a zero-length file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>touchz: Test for hdfs:// path - touching file</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///user/file0</command> |
| <command>-fs NAMENODE -du hdfs:///user/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>touchz: Test for hdfs:// path - touching many files </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file0 hdfs:///file1 hdfs:///file2</command> |
| <command>-fs NAMENODE -du hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 3 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]+/file0</expected-output> |
| <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]+/file1</expected-output> |
| <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]+/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>touchz: Test for hdfs:// path - touching already existing file </description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command> |
| <command>-fs NAMENODE -touchz hdfs:///data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>touchz: hdfs:///data15bytes must be a zero-length file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>touchz: Test for Namenode's path - touching file</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/user/file0</command> |
| <command>-fs NAMENODE -du NAMENODE/user/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>touchz: Test for Namenode path - touching many files </description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file0 NAMENODE/file1 NAMENODE/file2</command> |
| <command>-fs NAMENODE -du NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 3 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^0( )*hdfs://localhost[.a-z]*:[0-9]+/file0</expected-output> |
| <expected-output>^0( )*hdfs://localhost[.a-z]*:[0-9]+/file1</expected-output> |
| <expected-output>^0( )*hdfs://localhost[.a-z]*:[0-9]+/file2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>touchz: Test for Namenode's path - touching already existing file </description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command> |
| <command>-fs NAMENODE -touchz NAMENODE/data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/data15bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>touchz: hdfs://localhost[.a-z]*:[0-9]+/data15bytes must be a zero-length file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!--Tests for test--> |
| <test> <!-- TESTED --> |
| <description>test: non existent file (absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -test -z /dir0/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^test: File does not exist: /dir0/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>test: non existent file (relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -test -z file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^test: File does not exist: file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>test: non existent directory (absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -test -d /dir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^test: File does not exist: /dir</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>test: non existent directory (relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -test -d dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^test: File does not exist: dir0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>test: Test for hdfs:// path - non existent file</description> |
| <test-commands> |
| <command>-fs NAMENODE -test -z hdfs:///dir0/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^test: File does not exist: hdfs:/dir0/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>test: Test for hdfs:// path - non existent directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -test -d hdfs:///dir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^test: File does not exist: hdfs:/dir</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>test: Test for Namenode's path - non existent file</description> |
| <test-commands> |
| <command>-fs NAMENODE -test -z NAMENODE/dir0/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^test: File does not exist: hdfs://localhost[.a-z]*:[0-9]+/dir0/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>test: Test for Namenode's path - non existent directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -test -d NAMENODE/dir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^test: File does not exist: hdfs://localhost[.a-z]*:[0-9]+/dir</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!--Tests for stat --> |
| <test> <!-- TESTED --> |
| <description>stat: statistics about file(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /data60bytes</command> |
| <command>-fs NAMENODE -stat "%n-%b" /data60bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /data60bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>data60bytes-60</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: statistics about file(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command> |
| <command>-fs NAMENODE -stat "%n-%b" data60bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>data60bytes-60</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: statistics about directory(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dirtest</command> |
| <command>-fs NAMENODE -stat "%n-%b-%o" /dirtest</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dirtest</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>dirtest-0-0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: statistics about directory(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dirtest</command> |
| <command>-fs NAMENODE -stat "%n-%b-%o" dirtest</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>dirtest-0-0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: statistics about files (absolute path) using globbing</description> |
| <test-commands> |
| <command>-fs -mkdir /dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command> |
| <command>-fs NAMENODE -mkdir /dir0/datadir</command> |
| <command>-fs NAMENODE -stat "%n-%b" /dir0/data*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data15bytes-15"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data30bytes-30"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data60bytes-60"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data120bytes-120"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"datadir-0"</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: statistics about files (relative path) using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command> |
| <command>-fs NAMENODE -mkdir datadir</command> |
| <command>-fs NAMENODE -stat "%n-%b" data*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data15bytes-15"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data30bytes-30"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data60bytes-60"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data120bytes-120"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"datadir-0"</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: statistics about file or directory(absolute path) that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -stat /file</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^stat: cannot stat `/file': No such file or directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: statistics about file or directory(relative path) that does not exist </description> |
| <test-commands> |
| <command>-fs NAMENODE -stat file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^stat: cannot stat `file1': No such file or directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: Test for hdfs:// path - statistics about file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///data60bytes</command> |
| <command>-fs NAMENODE -stat "%n-%b" hdfs:///data60bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///data60bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>data60bytes-60</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: Test for hdfs:// path - statistics about directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dirtest</command> |
| <command>-fs NAMENODE -stat "%n-%b-%o" hdfs:///dirtest</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dirtest</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>dirtest-0-0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: Test for hdfs:// path - statistics about files using globbing</description> |
| <test-commands> |
| <command>-fs -mkdir /dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/datadir</command> |
| <command>-fs NAMENODE -stat "%n-%b" hdfs:///dir0/data*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data15bytes-15"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data30bytes-30"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data60bytes-60"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data120bytes-120"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"datadir-0"</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: Test for hdfs:// path - statistics about file or directory that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -stat hdfs:///file</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^stat: cannot stat `hdfs:///file': No such file or directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: Test for Namenode's path - statistics about file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/data60bytes</command> |
| <command>-fs NAMENODE -stat "%n-%b" NAMENODE/data60bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/data60bytes</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>data60bytes-60</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: Test for Namenode's path - statistics about directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dirtest</command> |
| <command>-fs NAMENODE -stat "%n-%b-%o" NAMENODE/dirtest</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dirtest</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>dirtest-0-0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: Test for Namenode's path - statistics about files using globbing</description> |
| <test-commands> |
| <command>-fs -mkdir /dir0</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/datadir</command> |
| <command>-fs NAMENODE -stat "%n-%b" NAMENODE/dir0/data*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data15bytes-15"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data30bytes-30"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data60bytes-60"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data120bytes-120"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"datadir-0"</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>stat: Test for Namenode's path - statistics about file or directory that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -stat NAMENODE/file</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^stat: cannot stat `hdfs://localhost[.a-z]*:[0-9]+/file': No such file or directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for tail --> |
| <test> <!-- TESTED --> |
| <description>tail: contents of file(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command> |
| <command>-fs NAMENODE -tail /data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>12345678901234</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--TESTED--> |
| <description>tail: contents of file(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command> |
| <command>-fs NAMENODE -tail data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>12345678901234</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: contents of files(absolute path) using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -tail /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: File does not exist: /file\*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: contents of files(relative path) using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -tail file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: File does not exist: file\*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: contents of file(absolute path) that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -tail /file</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: File does not exist: /file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: contents of file(relative path) that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -tail file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: File does not exist: file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: contents of directory(absolute path) </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <command>-fs NAMENODE -tail /dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: Source must be a file.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: contents of directory(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir1</command> |
| <command>-fs NAMENODE -tail dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: Source must be a file.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: Test for hdfs:// path - contents of file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command> |
| <command>-fs NAMENODE -tail hdfs:///data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>12345678901234</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: Test for hdfs:// path - contents of files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -tail hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: File does not exist: hdfs:/file\*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: Test for hdfs:// path - contents of file that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -tail hdfs:///file</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: File does not exist: hdfs:/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: Test for hdfs:// path - contents of directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -tail hdfs:///dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: Source must be a file.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: Test for Namenode's path - contents of file</description> |
| <test-commands> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command> |
| <command>-fs NAMENODE -tail NAMENODE/data15bytes</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>12345678901234</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: Test for Namenode's path - contents of files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -tail NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: File does not exist: hdfs://localhost[.a-z]*:[0-9]+/file\*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: Test for Namenode's path - contents of file that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -tail NAMENODE/file</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: File does not exist: hdfs://localhost[.a-z]*:[0-9]+/file</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>tail: Test for Namenode's path - contents of directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -tail NAMENODE/dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^tail: Source must be a file.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for count --> |
| <test> <!-- TESTED --> |
| <description>count: file using absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -count /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: file using relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -count file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: directory using absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <command>-fs NAMENODE -count /dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: directory using relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir1</command> |
| <command>-fs NAMENODE -count dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: absolute path to file/directory that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -count /file1 </command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Can not find listing for /file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: relative path to file/directory that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -count file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Can not find listing for file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: absolute path to multiple files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -count /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: relative path to multiple files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -count file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: absolute path to multiple files without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -count /file1 /file2 /file3 /file4</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: relative path to multiple files without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -count file1 file2 file3 file4</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: absolute path to multiple directories using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir3</command> |
| <command>-fs NAMENODE -mkdir /dir4</command> |
| <command>-fs NAMENODE -count /dir* </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: relative path to multiple directories using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir1</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir3</command> |
| <command>-fs NAMENODE -mkdir dir4</command> |
| <command>-fs NAMENODE -count dir* </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: absolute path to multiple directories without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir3</command> |
| <command>-fs NAMENODE -mkdir /dir4</command> |
| <command>-fs NAMENODE -count /dir1 /dir2 /dir3 /dir4 </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: relative path to multiple directories without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir1</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir3</command> |
| <command>-fs NAMENODE -mkdir dir4</command> |
| <command>-fs NAMENODE -count dir1 dir2 dir3 dir4 </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: file using absolute path with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -count -q /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: file using relative path with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -count -q file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: directory using absolute path with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q /dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: directory using relative path with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir1</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: absolute path to file/directory that does not exist with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -count -q /file1 </command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Can not find listing for /file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: relative path to file/directory that does not exist with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -count -q file1</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Can not find listing for file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: absolute path to multiple files using globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -count -q /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: relative path to multiple files using globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -count -q file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: absolute path to multiple files without globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -count -q /file1 /file2 /file3 /file4</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: relative path to multiple files without globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -count -q file1 file2 file3 file4</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: absolute path to multiple directories using globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir3</command> |
| <command>-fs NAMENODE -mkdir /dir4</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q /dir* </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: relative path to multiple directories using globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir1</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir3</command> |
| <command>-fs NAMENODE -mkdir dir4</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q dir* </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: absolute path to multiple directories without globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir3</command> |
| <command>-fs NAMENODE -mkdir /dir4</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q /dir1 /dir2 /dir3 /dir4 </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: relative path to multiple directories without globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir1</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir3</command> |
| <command>-fs NAMENODE -mkdir dir4</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q dir1 dir2 dir3 dir4 </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for file using hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -count hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for directory using hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -count hdfs:///dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for hdfs:// path - file/directory that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -count hdfs:///file1 </command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Can not find listing for hdfs:///file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for hdfs:// path - multiple files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -count hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for hdfs:// path - multiple files without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -count hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for hdfs:// path - multiple directories using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir3</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir4</command> |
| <command>-fs NAMENODE -count hdfs:///dir* </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for hdfs:// path - multiple directories without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir3</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir4</command> |
| <command>-fs NAMENODE -count hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for file using hdfs:// path with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -count -q hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for directory using hdfs:// path with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q hdfs:///dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for hdfs:// path - file/directory that does not exist with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -count -q hdfs:///file1 </command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Can not find listing for hdfs:///file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for hdfs:// path - multiple files using globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -count -q hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for hdfs:// path - multiple files without globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -count -q hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for hdfs:// path - multiple directories using globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir3</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir4</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q hdfs:///dir* </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for hdfs:// path - multiple directories without globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir1</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir3</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir4</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for file using Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -count NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for directory using Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -count NAMENODE/dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for Namenode's path - file/directory that does not exist</description> |
| <test-commands> |
| <command>-fs NAMENODE -count NAMENODE/file1 </command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Can not find listing for hdfs://localhost[.a-z]*:[0-9]+/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for Namenode's path - multiple files using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -count NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for Namenode's path - multiple files without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -count NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for Namenode's path - multiple directories using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir3</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir4</command> |
| <command>-fs NAMENODE -count NAMENODE/dir* </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for Namenode's path - multiple directories without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir3</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir4</command> |
| <command>-fs NAMENODE -count NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for file using Namenode's path with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -count -q NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for directory using Namenode's path with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q NAMENODE/dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for Namenode's path - file/directory that does not exist with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -count -q NAMENODE/file1 </command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Can not find listing for hdfs://localhost[.a-z]*:[0-9]+/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for Namenode's path - multiple files using globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -count -q NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for Namenode's path - multiple files without globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -count -q NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for Namenode's path - multiple directories using globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir3</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir4</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q NAMENODE/dir* </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>count: Test for Namenode's path - multiple directories without globbing with -q option</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir1</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir3</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir4</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command> |
| <command>-fs NAMENODE -count -q NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs://localhost[.a-z]*:[0-9]*/dir4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for chmod --> |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -chmod 777 /file1</command> |
| <command>-fs NAMENODE -ls /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -chmod 666 file1</command> |
| <command>-fs NAMENODE -ls file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of directory in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 /dir0/dir1</command> |
| <command>-fs NAMENODE -lsr /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of directory in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 dir0/dir1</command> |
| <command>-fs NAMENODE -lsr dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -chmod a+rw /file1</command> |
| <command>-fs NAMENODE -ls /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -chmod a+rw file1</command> |
| <command>-fs NAMENODE -ls file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of directory in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx /dir0/dir1</command> |
| <command>-fs NAMENODE -lsr /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of directory in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx dir0/dir1</command> |
| <command>-fs NAMENODE -lsr dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of directory in absolute path recursively </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 /dir0/dir1</command> |
| <command>-fs NAMENODE -lsr /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of directory in relative path recursively</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 dir0/dir1</command> |
| <command>-fs NAMENODE -lsr dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of directory in absolute path recursively</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx /dir0/dir1</command> |
| <command>-fs NAMENODE -lsr /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of directory in relative path recursively</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx dir0/dir1</command> |
| <command>-fs NAMENODE -lsr dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of non existent file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chmod 777 /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: could not get status for '/file1': File does not exist: /file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of non existent file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chmod 666 file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: could not get status for 'file1': File does not exist: file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of non existent file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chmod a+rw /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: could not get status for '/file1': File does not exist: /file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of non existent file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chmod a+rw file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: could not get status for 'file1': File does not exist: file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple files in absolute path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -chmod 777 /file* </command> |
| <command>-fs NAMENODE -lsr /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple files in relative path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -chmod 777 file* </command> |
| <command>-fs NAMENODE -lsr file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in absolute path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 /dir*</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in relative path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 dir*</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple files in absolute path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -chmod 777 /file1 /file2 /file3 /file4 </command> |
| <command>-fs NAMENODE -lsr /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple files in relative path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -chmod 777 file1 file2 file3 file4 </command> |
| <command>-fs NAMENODE -lsr file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in absolute path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 /dir0 /dir2</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in relative path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 dir0 dir2</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple files in absolute path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -chmod a+rw /file* </command> |
| <command>-fs NAMENODE -lsr /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple files in relative path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -chmod a+rw file* </command> |
| <command>-fs NAMENODE -lsr file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in absolute path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx /dir*</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in relative path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx dir*</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple files in absolute path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -chmod a+rw /file1 /file2 /file3 /file4 </command> |
| <command>-fs NAMENODE -lsr /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple files in relative path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -chmod a+rw file1 file2 file3 file4 </command> |
| <command>-fs NAMENODE -lsr file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in absolute path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx /dir0 /dir2</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in relative path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx dir0 dir2</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 /dir*</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in relative path recursively using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 dir*</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 /dir0 /dir2</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in relative path recursively without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 dir0 dir2</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx /dir*</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in relative path recursively using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx dir*</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx /dir0 /dir2</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in relative path recursively without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx dir0 dir2</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: invalid value in octal mode of file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -chmod 999 /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: chmod : mode '999' does not match the expected pattern.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: invalid value in octal mode of file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -chmod 999 file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: chmod : mode '999' does not match the expected pattern.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: invalid value in normal mode of file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -chmod r+def /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: invalid value in normal mode of file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -chmod r+def file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -chmod 777 hdfs:///file1</command> |
| <command>-fs NAMENODE -ls hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of directory in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command> |
| <command>-fs NAMENODE -ls hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of directory in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of directory in hdfs:// path recursively </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of directory in hdfs:// path recursively</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of non existent file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chmod 777 hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: could not get status for 'hdfs:/file1': File does not exist: hdfs:/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of non existent file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: could not get status for 'hdfs:/file1': File does not exist: hdfs:/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple files in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -chmod 777 hdfs:///file* </command> |
| <command>-fs NAMENODE -lsr hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 hdfs:///dir*</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple files in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -chmod 777 hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command> |
| <command>-fs NAMENODE -lsr hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 hdfs:///dir0 hdfs:///dir2</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple files in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -chmod a+rw hdfs:///file* </command> |
| <command>-fs NAMENODE -lsr hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx hdfs:///dir*</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple files in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -chmod a+rw hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command> |
| <command>-fs NAMENODE -lsr hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0 hdfs:///dir2</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 hdfs:///dir*</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0 hdfs:///dir2</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir*</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0 hdfs:///dir2</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: invalid value in octal mode of file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -chmod 999 hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: chmod : mode '999' does not match the expected pattern.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: invalid value in normal mode of file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -chmod rdef hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for chmod --> |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command> |
| <command>-fs NAMENODE -ls NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of directory in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command> |
| <command>-fs NAMENODE -ls NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of directory in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of directory in Namenode's path recursively </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of directory in Namenode's path recursively</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of non existent file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: could not get status for 'hdfs://localhost[.a-z]*:[0-9]+/file1': File does not exist: hdfs://localhost[.a-z]*:[0-9]+/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of non existent file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: could not get status for 'hdfs://localhost[.a-z]*:[0-9]+/file1': File does not exist: hdfs://localhost[.a-z]*:[0-9]+/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple files in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -chmod 777 NAMENODE/file* </command> |
| <command>-fs NAMENODE -lsr NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 NAMENODE/dir*</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple files in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -chmod 777 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command> |
| <command>-fs NAMENODE -lsr NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod 777 NAMENODE/dir0 NAMENODE/dir2</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple files in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -chmod a+rw NAMENODE/file* </command> |
| <command>-fs NAMENODE -lsr NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir*</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple files in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -chmod a+rw NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command> |
| <command>-fs NAMENODE -lsr NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0 NAMENODE/dir2</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir*</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0 NAMENODE/dir2</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir*</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0 NAMENODE/dir2</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: invalid value in octal mode of file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -chmod 999 NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: chmod : mode '999' does not match the expected pattern.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chmod: invalid value in normal mode of file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -chmod rdef NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for chown --> |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command> |
| <command>-fs NAMENODE -ls hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of directory in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of directory in hdfs:// path recursively </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of non existent file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: could not get status for 'hdfs:/file1': File does not exist: hdfs:/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple files in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file* </command> |
| <command>-fs NAMENODE -lsr hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir*</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple files in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command> |
| <command>-fs NAMENODE -lsr hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0 hdfs:///dir2</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories recursively in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir*</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories recursively in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0 hdfs:///dir2</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: invalid option for owner of file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -chown %:newgroup hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: invalid option for group of file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -chown newowner:% hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for chown --> |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -chown newowner:newgroup /file1</command> |
| <command>-fs NAMENODE -ls /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -chown newowner:newgroup file1</command> |
| <command>-fs NAMENODE -ls file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of directory in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup /dir0/dir1</command> |
| <command>-fs NAMENODE -lsr /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of directory in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup dir0/dir1</command> |
| <command>-fs NAMENODE -lsr dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of directory in absolute path recursively </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup /dir0/dir1</command> |
| <command>-fs NAMENODE -lsr /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of directory in relative path recursively </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup dir0/dir1</command> |
| <command>-fs NAMENODE -lsr dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of non existent file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chown newowner:newgroup /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: could not get status for '/file1': File does not exist: /file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of non existent file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chown newowner:newgroup file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: could not get status for 'file1': File does not exist: file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple files in absolute path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -chown newowner:newgroup /file* </command> |
| <command>-fs NAMENODE -lsr /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple files in relative path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -chown newowner:newgroup file* </command> |
| <command>-fs NAMENODE -lsr file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories in absolute path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup /dir*</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories in relative path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup dir*</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple files in absolute path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -chown newowner:newgroup /file1 /file2 /file3 /file4 </command> |
| <command>-fs NAMENODE -lsr /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple files in relative path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -chown newowner:newgroup file1 file2 file3 file4 </command> |
| <command>-fs NAMENODE -lsr file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories in absolute path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup /dir0 /dir2</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories in relative path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup dir0 dir2</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories recursively in absolute path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup /dir*</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories recursively in relative path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup dir*</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories recursively in absolute path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup /dir0 /dir2</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories recursively in relative path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup dir0 dir2</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: invalid option for owner of file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -chown %:newgroup /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: invalid option for owner of file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -chown %:newgroup file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: invalid option for group of file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -chown newowner:% /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: invalid option for group of file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -chown newowner:% file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command> |
| <command>-fs NAMENODE -ls NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of directory in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of directory in Namenode's path recursively </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of non existent file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: could not get status for 'hdfs://localhost[.a-z]*:[0-9]+/file1': File does not exist: hdfs://localhost[.a-z]*:[0-9]+/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple files in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file* </command> |
| <command>-fs NAMENODE -lsr NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir*</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple files in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command> |
| <command>-fs NAMENODE -lsr NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories recursively in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir*</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: change ownership of multiple directories recursively in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: invalid option for owner of file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -chown %:newgroup NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chown: invalid option for group of file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -chown newowner:% NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for chgrp --> |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -chgrp newgroup /file1</command> |
| <command>-fs NAMENODE -ls /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -chgrp newgroup file1</command> |
| <command>-fs NAMENODE -ls file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of directory in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup /dir0/dir1</command> |
| <command>-fs NAMENODE -lsr /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of directory in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup dir0/dir1</command> |
| <command>-fs NAMENODE -lsr dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of directory in absolute path recursively </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup /dir0/dir1</command> |
| <command>-fs NAMENODE -lsr /dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of directory in relative path recursively </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup dir0/dir1</command> |
| <command>-fs NAMENODE -lsr dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of non existent file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chgrp newgroup /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chgrp: could not get status for '/file1': File does not exist: /file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of non existent file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chgrp newgroup file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chgrp: could not get status for 'file1': File does not exist: file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple files in absolute path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -chgrp newgroup /file* </command> |
| <command>-fs NAMENODE -lsr /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple files in relative path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -chgrp newgroup file* </command> |
| <command>-fs NAMENODE -lsr file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories in absolute path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup /dir*</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories in relative path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup dir*</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change of multiple files in absolute path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -touchz /file2</command> |
| <command>-fs NAMENODE -touchz /file3</command> |
| <command>-fs NAMENODE -touchz /file4</command> |
| <command>-fs NAMENODE -chgrp newgroup /file1 /file2 /file3 /file4 </command> |
| <command>-fs NAMENODE -lsr /file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple files in relative path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -touchz file2</command> |
| <command>-fs NAMENODE -touchz file3</command> |
| <command>-fs NAMENODE -touchz file4</command> |
| <command>-fs NAMENODE -chgrp newgroup file1 file2 file3 file4 </command> |
| <command>-fs NAMENODE -lsr file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories in absolute path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup /dir0 /dir2</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories in relative path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup dir0 dir2</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories recursively in absolute path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup /dir*</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories recursively in relative path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup dir*</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories recursively in absolute path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir0</command> |
| <command>-fs NAMENODE -mkdir /dir0/dir1</command> |
| <command>-fs NAMENODE -touchz /dir0/file0</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir2/dir1</command> |
| <command>-fs NAMENODE -touchz /dir2/file0</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz /dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup /dir0 /dir2</command> |
| <command>-fs NAMENODE -lsr /dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories recursively in relative path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir dir0</command> |
| <command>-fs NAMENODE -mkdir dir0/dir1</command> |
| <command>-fs NAMENODE -touchz dir0/file0</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir dir2</command> |
| <command>-fs NAMENODE -mkdir dir2/dir1</command> |
| <command>-fs NAMENODE -touchz dir2/file0</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup dir0 dir2</command> |
| <command>-fs NAMENODE -lsr dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: invalid option for group of file in absolute path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz /file1</command> |
| <command>-fs NAMENODE -chgrp % /file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm /file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chgrp: '%' does not match expected pattern for group</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: invalid option for group of file in relative path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz file1</command> |
| <command>-fs NAMENODE -chgrp % file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chgrp: '%' does not match expected pattern for group</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command> |
| <command>-fs NAMENODE -ls hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of directory in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of directory in hdfs:// path recursively </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of non existent file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chgrp: could not get status for 'hdfs:/file1': File does not exist: hdfs:/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple files in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -chgrp newgroup hdfs:///file* </command> |
| <command>-fs NAMENODE -lsr hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup hdfs:///dir*</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change of multiple files in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///file2</command> |
| <command>-fs NAMENODE -touchz hdfs:///file3</command> |
| <command>-fs NAMENODE -touchz hdfs:///file4</command> |
| <command>-fs NAMENODE -chgrp newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command> |
| <command>-fs NAMENODE -lsr hdfs:///file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0 hdfs:///dir2</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories recursively in hdfs:// path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir*</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories recursively in hdfs:// path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2</command> |
| <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0 hdfs:///dir2</command> |
| <command>-fs NAMENODE -lsr hdfs:///dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: invalid option for group of file in hdfs:// path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file1</command> |
| <command>-fs NAMENODE -chgrp % hdfs:///file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm hdfs:///file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chgrp: '%' does not match expected pattern for group</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for chgrp --> |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command> |
| <command>-fs NAMENODE -ls NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of directory in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of directory in Namenode's path recursively </description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of non existent file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chgrp: could not get status for 'hdfs://localhost[.a-z]*:[0-9]+/file1': File does not exist: hdfs://localhost[.a-z]*:[0-9]+/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple files in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -chgrp newgroup NAMENODE/file* </command> |
| <command>-fs NAMENODE -lsr NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir*</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change of multiple files in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file2</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file3</command> |
| <command>-fs NAMENODE -touchz NAMENODE/file4</command> |
| <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command> |
| <command>-fs NAMENODE -lsr NAMENODE/file*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0 NAMENODE/dir2</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories recursively in Namenode's path using globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir*</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: change group of multiple directories recursively in Namenode's path without globbing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2</command> |
| <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command> |
| <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command> |
| <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0 NAMENODE/dir2</command> |
| <command>-fs NAMENODE -lsr NAMENODE/dir*</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/dir*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>chgrp: invalid option for group of file in Namenode's path</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file1</command> |
| <command>-fs NAMENODE -chgrp % NAMENODE/file1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm NAMENODE/file1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^chgrp: '%' does not match expected pattern for group</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for ls</description> |
| <test-commands> |
| <command>-fs NAMENODE -help ls</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-ls <path>:( |\t)*List the contents that match the specified file pattern. If( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*path is not specified, the contents of /user/<currentUser>( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*path is not specified, the contents of /user/<currentUser>( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*will be listed. Directory entries are of the form( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*dirName \(full path\) <dir>( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*and file entries are of the form( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*fileName\(full path\) <r n> size( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*where n is the number of replicas specified for the file( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*and size is the size of the file, in bytes.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for lsr</description> |
| <test-commands> |
| <command>-fs NAMENODE -help lsr</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-lsr <path>:( |\t)*Recursively list the contents that match the specified( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*file pattern.( |\t)*Behaves very similarly to hadoop fs -ls,( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*except that the data is shown for all the entries in the( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*subtree.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for get</description> |
| <test-commands> |
| <command>-fs NAMENODE -help get</command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-get( )*\[-ignoreCrc\]( )*\[-crc\]( )*<src> <localdst>:( |\t)*Copy files that match the file pattern <src>( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*to the local name.( )*<src> is kept.( )*When copying mutiple,( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*files, the destination must be a directory.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for du</description> |
| <test-commands> |
| <command>-fs NAMENODE -help du</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-du \[-s\] \[-h\] <path>:\s+Show the amount of space, in bytes, used by the files that\s*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^\s*match the specified file pattern. The following flags are optional:</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^\s*-s\s*Rather than showing the size of each individual file that</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^\s*matches the pattern, shows the total \(summary\) size.</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^\s*-h\s*Formats the sizes of files in a human-readable fashion</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>\s*rather than a number of bytes.</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^\s*Note that, even without the -s option, this only shows size summaries</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^\s*one level deep into a directory.</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^\s*The output is in the form </expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^\s*size\s+name\(full path\)\s*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for dus</description> |
| <test-commands> |
| <command>-fs NAMENODE -help dus</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-dus <path>:( |\t)*Show the amount of space, in bytes, used by the files that( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*match the specified file pattern. This is equivalent to -du -s above.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for count</description> |
| <test-commands> |
| <command>-fs NAMENODE -help count</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-count\[-q\] <path>: Count the number of directories, files and bytes under the paths( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*that match the specified file pattern. The output columns are:( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME or( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*QUOTA REMAINING_QUATA SPACE_QUOTA REMAINING_SPACE_QUOTA( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for mv</description> |
| <test-commands> |
| <command>-fs NAMENODE -help mv</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-mv <src> <dst>:( |\t)*Move files that match the specified file pattern <src>( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*to a destination <dst>. When moving multiple files, the( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*destination must be a directory.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for cp</description> |
| <test-commands> |
| <command>-fs NAMENODE -help cp</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-cp <src> <dst>:( |\t)*Copy files that match the file pattern <src> to a( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*destination. When copying multiple files, the destination( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*must be a directory.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for rm</description> |
| <test-commands> |
| <command>-fs NAMENODE -help rm</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rm \[-skipTrash\] <src>:( |\t)*Delete all files that match the specified file pattern.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Equivalent to the Unix command "rm <src>"( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*-skipTrash option bypasses trash, if enabled, and immediately( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*deletes <src>( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for rmr</description> |
| <test-commands> |
| <command>-fs NAMENODE -help rmr</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-rmr \[-skipTrash\] <src>:( |\t)*Remove all directories which match the specified file( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*pattern. Equivalent to the Unix command "rm -rf <src>"( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*-skipTrash option bypasses trash, if enabled, and immediately( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*deletes <src>( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for put</description> |
| <test-commands> |
| <command>-fs NAMENODE -help put</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-put <localsrc> ... <dst>:( |\t)*Copy files from the local file system( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*into fs.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for copyFromLocal</description> |
| <test-commands> |
| <command>-fs NAMENODE -help copyFromLocal</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-copyFromLocal <localsrc> ... <dst>:( )*Identical to the -put command.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for moveFromLocal</description> |
| <test-commands> |
| <command>-fs NAMENODE -help moveFromLocal</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-moveFromLocal <localsrc> ... <dst>: Same as -put, except that the source is( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*deleted after it's copied.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for get</description> |
| <test-commands> |
| <command>-fs NAMENODE -help get</command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-get( )*\[-ignoreCrc\]( )*\[-crc\]( )*<src> <localdst>:( |\t)*Copy files that match the file pattern <src>( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*to the local name.( )*<src> is kept.( )*When copying mutiple,( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*files, the destination must be a directory.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for getmerge</description> |
| <test-commands> |
| <command>-fs NAMENODE -help getmerge</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-getmerge <src> <localdst>: Get all the files in the directories that( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*match the source file pattern and merge and sort them to only( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*one file on local fs. <src> is kept.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for cat</description> |
| <test-commands> |
| <command>-fs NAMENODE -help cat</command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-cat <src>:( |\t)*Fetch all files that match the file pattern <src>( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*and display their content on stdout.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for copyToLocal</description> |
| <test-commands> |
| <command>-fs NAMENODE -help copyToLocal</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-copyToLocal \[-ignoreCrc\] \[-crc\] <src> <localdst>:( )*Identical to the -get command.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for moveToLocal</description> |
| <test-commands> |
| <command>-fs NAMENODE -help moveToLocal</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-moveToLocal <src> <localdst>:( )*Not implemented yet( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for mkdir</description> |
| <test-commands> |
| <command>-fs NAMENODE -help mkdir</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-mkdir <path>:( |\t)*Create a directory in specified location.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for setrep</description> |
| <test-commands> |
| <command>-fs NAMENODE -help setrep</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-setrep \[-R\] \[-w\] <rep> <path/file>:( )*Set the replication level of a file.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*The -R flag requests a recursive change of replication level( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*for an entire tree.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for touchz</description> |
| <test-commands> |
| <command>-fs NAMENODE -help touchz</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-touchz <path>: Write a timestamp in yyyy-MM-dd HH:mm:ss format( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*in a file at <path>. An error is returned if the file exists with non-zero length( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for test</description> |
| <test-commands> |
| <command>-fs NAMENODE -help test</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-test -\[ezd\] <path>: If file \{ exists, has zero length, is a directory( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*then return 0, else return 1.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for stat</description> |
| <test-commands> |
| <command>-fs NAMENODE -help stat</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-stat \[format\] <path>: Print statistics about the file/directory at <path>( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*in the specified format. Format accepts filesize in blocks \(%b\), filename \(%n\),( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*block size \(%o\), replication \(%r\), modification date \(%y, %Y\)( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for tail</description> |
| <test-commands> |
| <command>-fs NAMENODE -help tail</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-tail \[-f\] <file>: Show the last 1KB of the file.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*The -f option shows apended data as the file grows.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for chmod</description> |
| <test-commands> |
| <command>-fs NAMENODE -help chmod</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-chmod \[-R\] <MODE\[,MODE\]... \| OCTALMODE> PATH...( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Changes permissions of a file.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*This works similar to shell's chmod with a few exceptions.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*-R( |\t)*modifies the files recursively. This is the only option( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*currently supported.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*MODE( |\t)*Mode is same as mode used for chmod shell command.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Only letters recognized are 'rwxXt'. E.g. \+t,a\+r,g-w,\+rwx,o=r( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*OCTALMODE Mode specifed in 3 or 4 digits. If 4 digits, the first may( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\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( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*E.g. 754 is same as u=rwx,g=rx,o=r( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*If none of 'augo' is specified, 'a' is assumed and unlike( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*shell command, no umask is applied.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for chown</description> |
| <test-commands> |
| <command>-fs NAMENODE -help chown</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-chown \[-R\] \[OWNER\]\[:\[GROUP\]\] PATH...( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Changes owner and group of a file.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*This is similar to shell's chown with a few exceptions.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*-R( |\t)*modifies the files recursively. This is the only option( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*currently supported.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*If only owner or group is specified then only owner or( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*group is modified.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*The owner and group names may only cosists of digits, alphabet,( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*and any of '-_.@/' i.e. \[-_.@/a-zA-Z0-9\]. The names are case( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*sensitive.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*WARNING: Avoid using '.' to separate user name and group though( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Linux allows it. If user names have dots in them and you are( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*using local file system, you might see surprising results since( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*shell command 'chown' is used for local files.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for chgrp</description> |
| <test-commands> |
| <command>-fs NAMENODE -help chgrp</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-chgrp \[-R\] GROUP PATH...( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*This is equivalent to -chown ... :GROUP ...( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>help: help for help</description> |
| <test-commands> |
| <command>-fs NAMENODE -help help</command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-help \[cmd\]:( |\t)*Displays help for given command or all commands if none( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*is specified.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin report</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help report</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-report:( |\t)*Reports basic filesystem information and statistics.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin safemode</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help safemode</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-safemode <enter\|leave\|get\|wait>:( |\t)*Safe mode maintenance command.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Safe mode is a Namenode state in which it( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*1.( )*does not accept changes to the name space \(read-only\)( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*2.( )*does not replicate or delete blocks.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Safe mode is entered automatically at Namenode startup, and( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*leaves safe mode automatically when the configured minimum( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*percentage of blocks satisfies the minimum replication( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*condition. Safe mode can also be entered manually, but then( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*it can only be turned off manually as well.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin refreshNodes</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help refreshNodes</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-refreshNodes:( |\t)*Updates the set of hosts allowed to connect to namenode.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Re-reads the config file to update values defined by( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*dfs.hosts and dfs.host.exclude and reads the( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*entires \(hostnames\) in those files.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Each entry not defined in dfs.hosts but in( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*dfs.hosts.exclude is decommissioned. Each entry defined( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*in dfs.hosts and also in dfs.host.exclude is stopped from( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*decommissioning if it has aleady been marked for decommission.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Entires not present in both the lists are decommissioned.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin finalizeUpgrade</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help finalizeUpgrade</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-finalizeUpgrade:( )*Finalize upgrade of HDFS.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Datanodes delete their previous version working directories,( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*followed by Namenode doing the same.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*This completes the upgrade process.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin upgradeProgress</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help upgradeProgress</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-upgradeProgress <status\|details\|force>:( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*request current distributed upgrade status,( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*a detailed status or force the upgrade to proceed.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin metasave</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help metasave</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-metasave <filename>:( |\t)*Save Namenode's primary data structures( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*to <filename> in the directory specified by hadoop.log.dir property.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*<filename> will contain one line for each of the following( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*1. Datanodes heart beating with Namenode( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*2. Blocks waiting to be replicated( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*3. Blocks currrently being replicated( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*4. Blocks waiting to be deleted( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin setQuota</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help setQuota</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-setQuota <quota> <dirname>...<dirname>: Set the quota <quota> for each directory <dirName>.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*The directory quota is a long integer that puts a hard limit( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*on the number of names in the directory tree( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*For each directory, attempt to set the quota. An error will be reported if( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*1. N is not a positive integer, or( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*2. user is not an administrator, or( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*3. the directory does not exist or is a file, or( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin clrQuota</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help clrQuota</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-clrQuota <dirname>...<dirname>: Clear the quota for each directory <dirName>.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin setSpaceQuota</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help setSpaceQuota</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-setSpaceQuota <quota> <dirname>...<dirname>: Set the disk space quota <quota> for each directory <dirName>.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*The space quota is a long integer that puts a hard limit( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*on the total size of all the files under the directory tree.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*2. user is not an administrator, or( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin clrSpaceQuota</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help clrSpaceQuota</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-clrSpaceQuota <dirname>...<dirname>: Clear the disk space quota for each directory <dirName>.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin refreshServiceAcl</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help refreshServiceAcl</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-refreshServiceAcl: Reload the service-level authorization policy file( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*Namenode will reload the authorization policy file.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>help: help for dfsadmin help</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -help help</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^-help \[cmd\]:( |\t)*Displays help for the given command or all commands if none( )*</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^( |\t)*is specified.( )*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>verifying error messages for quota commands - setting quota on a file</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /test </command> |
| <command>-fs NAMENODE -touchz /test/file1 </command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 1 /test/file1 </dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -setQuota 5 /test </dfs-admin-command> |
| <!-- Same directory will be used in the next test --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>Cannot set quota on a file: /test/file1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>verifying error messages for quota commands - setting quota on non-existing file</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1g /test1 </dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- Same directory will be used in the next test --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>Can not find listing for /test1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>verifying error messages for quota commands - exceeding quota</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -setQuota 3 /test </dfs-admin-command> |
| <command>-fs NAMENODE -touchz /test/file0 </command> |
| <command>-fs NAMENODE -mkdir /test/test1 </command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- Same directory(/test) will be used in the next test --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>The NameSpace quota (directories and files) of directory /test is exceeded</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>verifying error messages for quota commands - setting not valid quota</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -setQuota 0 /test </dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- Same directory will be used in the next test --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>Invalid values for quota : 0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>verifying error messages for quota commands - setting not valid space quota</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota a5 /test </dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- Same directory will be used in the next test --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>For input string: "a5"</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>verifying error messages for quota commands - clearQuota on non existing file</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -clrQuota /test1 </dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /test </command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>Can not find listing for /test1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>verifying error messages for quota commands - using globing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir3</command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1k /dir* </dfs-admin-command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir1/</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir* </command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>put: org.apache.hadoop.hdfs.protocol.DSQuotaExceededException: The DiskSpace quota of /dir1 is exceeded: quota=1024 diskspace consumed=[0-9.]+[kmg]*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>verifying error messages for quota commands - setting quota using globing</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /dir1</command> |
| <command>-fs NAMENODE -mkdir /dir2</command> |
| <command>-fs NAMENODE -mkdir /dir3</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 1 /dir* </dfs-admin-command> |
| <command>-fs NAMENODE -mkdir /dir1/dir4</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /dir* </command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>mkdir: org.apache.hadoop.hdfs.protocol.NSQuotaExceededException: The NameSpace quota (directories and files) of directory /dir1 is exceeded: quota=1 file count=2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>refreshServiceAcl: refreshing security authorization policy for namenode</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -refreshServiceAcl </dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>ExactComparator</type> |
| <expected-output></expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>refreshServiceAcl: verifying error message while refreshing security authorization policy for namenode</description> |
| <test-commands> |
| <!-- hadoop-policy.xml for tests has |
| security.refresh.policy.protocol.acl = ${user.name} --> |
| <dfs-admin-command>-fs NAMENODE -Dhadoop.job.ugi=blah,blah -refreshServiceAcl </dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>access denied</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Test for safemode --> |
| <test> <!-- TESTED --> |
| <description>safemode: Test for enter - Namenode is not in safemode</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Safe mode is ON</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>safemode: Test for enter - Namenode is already in safemode</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Safe mode is ON</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>safemode: Test for leave - Namenode is already in safemode</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Safe mode is OFF</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>safemode: Test for leave - Namenode is not in safemode</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Safe mode is OFF</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>safemode: Test for get - Namenode is not in safemode</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Safe mode is OFF</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>safemode:Test for get - Namenode is already in safemode</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Safe mode is ON</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>safemode: Test for wait - Namenode is not in safemode</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -safemode wait</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Safe mode is OFF</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>safemode: Test for wait - Namenode is already in safemode</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -safemode wait &</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Safe mode is OFF</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Test for report --> |
| <test> <!-- TESTED --> |
| <description>report: Displays the report about the Datanodes</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- no cleanup cmd --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>DFS Used\%: [0-9\.]+%</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Datanodes available: [0-9]+ \([0-9]+ total, [0-9]+ dead\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Name: [0-9\.:]+ \([a-zA-z0-9\.]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Decommission Status : [a-zA-Z]+</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>DFS Remaining%: [0-9\.]+%</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Live datanodes:</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Test for saveNamespace --> |
| <test> <!-- TESTED --> |
| <description>saveNamespace: to save the namespace when safemode is ON</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>ExactComparator</type> |
| <expected-output></expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>saveNamespace: to save the namespace when safemode is OFF</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>saveNamespace: java.io.IOException: Safe mode should be turned ON in order to create namespace image.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Test for refreshNodes --> |
| <test> <!-- TESTED --> |
| <description>refreshNodes: to refresh the nodes</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -refreshNodes</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- no cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>DFS Used\%: [0-9\.]+%</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Datanodes available: [0-9]+ \([0-9]+ total, [0-9]+ dead\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Name: [0-9\.:]+ \([a-zA-z0-9\.]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Decommission Status : [a-zA-Z]+</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>DFS Remaining%: [0-9\.]+%</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>Live datanodes:</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Test for metasave --> |
| <test> <!-- TESTED --> |
| <description>metasave: to save metadata</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -metasave metafile</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Created file metafile on server hdfs:\/\/[a-zA-Z0-9\.:]+</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Test for clrSpacequota --> |
| <test> <!-- TESTED --> |
| <description>clrSpaceQuota: Namenode is already in safemode</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir test</command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 15 test</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -clrSpaceQuota test</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr test</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>ExactComparator</type> |
| <expected-output></expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- Tested --> |
| <description>printTopology: verifying that the topology map is what we expect</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -printTopology</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <!-- No cleanup --> |
| </cleanup-commands> |
| <comparators> |
| <!-- miniDFS cluster started in CLITestHelper is set to match this output --> |
| <comparator> |
| <type>RegexpAcrossOutputComparator</type> |
| <expected-output>^Rack: \/rack1\s*127\.0\.0\.1:\d+\s\(localhost.*\)\s*127\.0\.0\.1:\d+\s\(localhost.*\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpAcrossOutputComparator</type> |
| <expected-output>Rack: \/rack2\s*127\.0\.0\.1:\d+\s\(localhost.*\)\s*127\.0\.0\.1:\d+\s\(localhost.*\)\s*127\.0\.0\.1:\d+\s\(localhost.*\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpAcrossOutputComparator</type> |
| <expected-output>Rack: \/rack3\s*127\.0\.0\.1:\d+\s\(localhost.*\)</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpAcrossOutputComparator</type> |
| <expected-output>Rack: \/rack4\s*127\.0\.0\.1:\d+\s\(localhost.*\)\s*127\.0\.0\.1:\d+\s\(localhost.*\)</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- Tests for moveFromLocal --> |
| <test> <!-- TESTED --> |
| <description>moveFromLocal: moving non existent file(absolute path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -moveFromLocal /user/wrongdata file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>moveFromLocal: File /user/wrongdata does not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>moveFromLocal: moving non existent file(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -moveFromLocal wrongdata file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>moveFromLocal: File wrongdata does not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>moveFromLocal: moving many files into an existing file</description> |
| <test-commands> |
| <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes /data15bytes</command> |
| <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data30bytes /data30bytes</command> |
| <command>-fs NAMENODE -touchz file0</command> |
| <command>-fs NAMENODE -moveFromLocal /data15bytes /data30bytes file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^moveFromLocal: copying multiple files, but last argument `file0' is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>moveFromLocal: moving many files into a non existent directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes /data15bytes</command> |
| <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data30bytes /data30bytes</command> |
| <command>-fs NAMENODE -moveFromLocal /data15bytes /data30bytes wrongdir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^moveFromLocal: `wrongdir': specified destination directory doest not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>moveFromLocal: Test for hdfs:// path - moving non existent file</description> |
| <test-commands> |
| <command>-fs NAMENODE -moveFromLocal /user/wrongdata hdfs:///file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>moveFromLocal: File /user/wrongdata does not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>moveFromLocal: Test for hdfs:// path - moving many files into an existing file</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz hdfs:///file0</command> |
| <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr hdfs:///*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^moveFromLocal: copying multiple files, but last argument `hdfs:/file0' is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>moveFromLocal: Test for hdfs:// path - moving many files into a non existent directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^moveFromLocal: `hdfs:/wrongdir': specified destination directory doest not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>moveFromLocal: Test for Namenode's path - moving non existent file</description> |
| <test-commands> |
| <command>-fs NAMENODE -moveFromLocal /user/wrongdata NAMENODE/file</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>moveFromLocal: File /user/wrongdata does not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>moveFromLocal: Test for Namenode's path - moving many files into an existing file</description> |
| <test-commands> |
| <command>-fs NAMENODE -touchz NAMENODE/file0</command> |
| <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr NAMENODE/*</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^moveFromLocal: copying multiple files, but last argument `hdfs://localhost[.a-z]*:[0-9]+/file0' is not a directory</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTED --> |
| <description>moveFromLocal: Test for Namenode's path - moving many files into a non existent directory</description> |
| <test-commands> |
| <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rmr /user</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^moveFromLocal: `hdfs://localhost[.a-z]*:[0-9]+/wrongdir': specified destination directory doest not exist</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| |
| <test> <!--Tested --> |
| <description>Verifying chmod operation is not permitted in safemode</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /test </command> |
| <command>-fs NAMENODE -touchz /test/file1 </command> |
| <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command> |
| <command>-fs NAMENODE -chmod 777 /test/file1 </command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -rmr /test </dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>Cannot set permission for /test/file1. Name node is in safe mode.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| <test> <!--Tested --> |
| <description>Verifying chown operation is not permitted in safemode</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /test </command> |
| <command>-fs NAMENODE -touchz /test/file1 </command> |
| <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command> |
| <command>-fs NAMENODE -chown root /test/file1 </command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -rmr /test </dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>Verifying chgrp operation is not permitted in safemode</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /test </command> |
| <command>-fs NAMENODE -touchz /test/file1 </command> |
| <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command> |
| <command>-fs NAMENODE -chgrp newgroup /test/file1 </command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -rmr /test </dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| |
| <test> <!--Tested --> |
| <description>Verifying setQuota operation is not permitted in safemode</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /test </command> |
| <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 100 /test </dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -rmr /test </dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>setQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot set quota on /test. Name node is in safe mode.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>Verifying clrQuota operation is not permitted in safemode</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /test </command> |
| <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -clrQuota /test </dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -rmr /test </dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>clrQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot set quota on /test. Name node is in safe mode.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| |
| <test> <!--Tested --> |
| <description>Verifying setSpaceQuota operation is not permitted in safemode</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /test </command> |
| <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 100 /test </dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -rmr /test </dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>setSpaceQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot set quota on /test. Name node is in safe mode.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!--Tested --> |
| <description>Verifying clrSpaceQuota operation is not permitted in safemode</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir /test </command> |
| <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -clrSpaceQuota /test </dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -rmr /test </dfs-admin-command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output>clrSpaceQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot set quota on /test. Name node is in safe mode.</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| |
| </tests> |
| </configuration> |