/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
XML | 11215 lines | 10681 code | 467 blank | 67 comment | 0 complexity | 5c5b365cdf367264187eac2ff63d5650 MD5 | raw file
Possible License(s): Apache-2.0
Large files files are truncated, but you can click here to view the full file
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet type="text/xsl" href="testConf.xsl"?>
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <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>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*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 -mkdir -p dir</command>
- <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>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*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: files using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p dir</command>
- <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 -rm -r /user</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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>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 -rm -r /dir1</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*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 -p dir1</command>
- <command>-fs NAMENODE -ls </command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r dir1</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*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 globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p dir1</command>
- <command>-fs NAMENODE -mkdir -p dir2</command>
- <command>-fs NAMENODE -mkdir -p dir3</command>
- <command>-fs NAMENODE -mkdir -p dir4</command>
- <command>-fs NAMENODE -ls </command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r /user</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir3</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*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: `/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: `/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>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/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>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///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( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/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( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///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 -p 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( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: dir at hdfs:// path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p 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( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///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 -p NAMENODE/user/dir1</command>
- <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir2</command>
- <command>-fs NAMENODE -mkdir -p 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( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir3</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: dir at hdfs:// path using globing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p hdfs:///user/dir1</command>
- <command>-fs NAMENODE -mkdir -p hdfs:///user/dir2</command>
- <command>-fs NAMENODE -mkdir -p 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( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///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: `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: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: whitespaces in an absolute path to a file</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p "/a path with/whitespaces in directories"</command>
- <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names"</command>
- <command>-fs NAMENODE -ls "/a path with/whitespaces in directories"</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r "/a path with"</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: whitespaces in a relative path to a file</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p "a path with/whitespaces in directories"</command>
- <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names"</command>
- <command>-fs NAMENODE -ls "a path with/whitespaces in directories"</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r "a path with"</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: whitespaces in a scheme-qualified path to a file</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p "NAMENODE/a path with/whitespaces in directories"</command>
- <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names"</command>
- <command>-fs NAMENODE -ls "NAMENODE/a path with/whitespaces in directories"</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r "NAMENODE/a path with"</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: whitespaces in an absolute path to a file, using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p "/a path with/whitespaces in directories"</command>
- <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names"</command>
- <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names 2"</command>
- <command>-fs NAMENODE -ls "/a*/w*"</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r "/a path with"</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>TokenComparator</type>
- <expected-output>Found 2 items</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names 2</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: whitespaces in a relative path to a file, using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p "a path with/whitespaces in directories"</command>
- <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names"</command>
- <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names 2"</command>
- <command>-fs NAMENODE -ls "a*/w*"</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r "a path with"</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>TokenComparator</type>
- <expected-output>Found 2 items</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names 2</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: whitespaces in a scheme-qualified path to a file, using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p "NAMENODE/a path with/whitespaces in directories"</command>
- <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names"</command>
- <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names 2"</command>
- <command>-fs NAMENODE -ls "NAMENODE/a*/w*"</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r "NAMENODE/a path with"</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>TokenComparator</type>
- <expected-output>Found 2 items</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names 2</expected-output>
- </comparator>
- </comparators>
- </test>
- <!-- Tests for ls -R -->
- <test> <!-- TESTED -->
- <description>ls: 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 -ls -R /dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r /dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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>ls: files/directories using relative path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p dir0</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir -p 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 -ls -R dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r /user</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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>ls: files/directories using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p dir0</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir -p 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 -ls -R dir0/*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r /user</command>
- </cleanup-commands>
- <comparators>
- <!-- JIRA?
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^/user/[a-zA-z0-9]*/dir0/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^/user/[a-zA-z0-9]*/dir0/dir2</expected-output>
- </comparator>
- -->
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*-( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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( )*USERNAME( )*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>ls: file/directory that does not exist in /</description>
- <test-commands>
- <command>-fs NAMENODE -ls -R /file1</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `/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 -R /user</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `/user': No such file or directory</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED -->
- <description>ls: 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 -ls -R 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( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: 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 -ls -R hdfs:///dir0/*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED -->
- <description>ls: Non-existent file/directory in hdfs:// path</description>
- <test-commands>
- <command>-fs NAMENODE -ls -R hdfs:///file1</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `hdfs:///file1': No such file or directory</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED -->
- <description>ls: 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 -ls -R 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( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: 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 -ls -R NAMENODE/dir0/*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: Non-URI input for non-existent file/directory in Namenode's path </description>
- <test-commands>
- <command>-fs NAMENODE -ls -R NAMENODE/file1</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: Negative test for quoted /*/* globbing </description>
- <windows>false</windows>
- <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 -ls -R /\*/\*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r /dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>TokenComparator</type>
- <expected-output>ls: `/*/*': No such file or directory</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>ls: Test for quoted globbing </description>
- <windows>false</windows>
- <test-commands>
- <command>-fs NAMENODE -mkdir /dir0</command>
- <command>-fs NAMENODE -mkdir /dir0/\*</command>
- <command>-fs NAMENODE -touchz /dir0/\*/file</command>
- <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
- <command>-fs NAMENODE -ls -R /dir0/\*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r /dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/\*/file</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>rm: Test for quoted globbing </description>
- <windows>false</windows>
- <test-commands>
- <command>-fs NAMENODE -mkdir /dir0</command>
- <command>-fs NAMENODE -mkdir /dir0/\*</command>
- <command>-fs NAMENODE -touchz /dir0/\*/file</command>
- <command>-fs NAMENODE -mkdir /dir0/…
Large files files are truncated, but you can click here to view the full file