test Test basic usage SubstringComparator Usage: bin/hdfs crypto [COMMAND] Test create ez, dir doesn't exist -fs NAMENODE -ls /test- -createZone -path /test SubstringComparator cannot find /test Test failure of create ez on an existing ez -fs NAMENODE -mkdir /foo -fs NAMENODE -ls /- -createZone -path /foo -createZone -path /foo -fs NAMENODE -rmdir /foo SubstringComparator Directory /foo is already in an encryption zone Test success of create ez in which a key is created -fs NAMENODE -mkdir /foo -fs NAMENODE -ls /- -createZone -path /foo -fs NAMENODE -rmdir /foo SubstringComparator Added encryption zone /foo Test failure of Create EZ operation in an existing EZ. -fs NAMENODE -mkdir /foo -fs NAMENODE -ls /- -createZone -path /foo -fs NAMENODE -mkdir /foo/bar -createZone -path /foo/bar -fs NAMENODE -rmdir /foo/bar -fs NAMENODE -rmdir /foo SubstringComparator Directory /foo/bar is already in an encryption zone. (/foo) Test failure of creating an EZ using a non-empty directory. -fs NAMENODE -mkdir /foo -fs NAMENODE -touchz /foo/bar -fs NAMENODE -ls /- -createZone -path /foo -fs NAMENODE -rm /foo/bar -fs NAMENODE -rmdir /foo SubstringComparator Attempt to create an encryption zone for a non-empty directory. Test failure of creating an EZ passing a key that doesn't exist. -fs NAMENODE -mkdir /foo -fs NAMENODE -ls /- -createZone -path /foo -keyName doesntexist -fs NAMENODE -rmdir /foo SubstringComparator Key doesntexist doesn't exist. Test success of creating an EZ when the key exists. -fs NAMENODE -mkdir /foo -fs NAMENODE -ls /- -createZone -path /foo -keyName mykey -fs NAMENODE -rmdir /foo SubstringComparator Added encryption zone /foo Test success of creating an encryption zone a few levels down. -fs NAMENODE -mkdir /foo -fs NAMENODE -mkdir /foo/bar -fs NAMENODE -mkdir /foo/bar/baz -fs NAMENODE -ls /- -createZone -path /foo/bar/baz -fs NAMENODE -rmdir /foo/bar/baz -fs NAMENODE -rmdir /foo/bar -fs NAMENODE -rmdir /foo/ SubstringComparator Added encryption zone /foo/bar/baz Test failure of renaming file cross EZ's -fs NAMENODE -mkdir /src -fs NAMENODE -mkdir /dst -fs NAMENODE -ls /- -createZone -path /src -createZone -path /dst -fs NAMENODE -mkdir /src/subdir -fs NAMENODE -mv /src/subdir /dst- -fs NAMENODE -rmdir /src/subdir -fs NAMENODE -rmdir /src -fs NAMENODE -rmdir /dst SubstringComparator /src/subdir can't be moved from encryption zone /src to encryption zone /dst. Test failure of renaming a non-EZ file into an EZ -fs NAMENODE -mkdir /src -fs NAMENODE -mkdir /dst -fs NAMENODE -ls /- -createZone -path /dst -fs NAMENODE -mv /src /dst- -fs NAMENODE -rmdir /src -fs NAMENODE -rmdir /dst SubstringComparator /src can't be moved into an encryption zone Test failure of renaming a non-EZ file from an EZ -fs NAMENODE -mkdir /src -fs NAMENODE -mkdir /dst -fs NAMENODE -ls /- -createZone -path /src -fs NAMENODE -mv /src /dst- -fs NAMENODE -rmdir /src -fs NAMENODE -rmdir /dst SubstringComparator /src can't be moved from an encryption zone Test success of renaming file intra-EZ -fs NAMENODE -mkdir /src -createZone -path /src -fs NAMENODE -mkdir /src/subdir1 -fs NAMENODE -mkdir /src/subdir2 -fs NAMENODE -mv /src/subdir1 /src/subdir2- -fs NAMENODE -rmdir /src/subdir2/subdir1 -fs NAMENODE -rmdir /src/subdir2 -fs NAMENODE -rmdir /src SubstringComparator