test Test basic usage SubstringComparator Usage: bin/hdfs crypto [COMMAND] Test create ez, dir doesn't exist -fs NAMENODE -ls /test- -createZone -path /test -keyName myKey SubstringComparator cannot find /test Test failure of create ez on an existing ez -fs NAMENODE -mkdir /foo -fs NAMENODE -ls /- -createZone -path /foo -keyName myKey -createZone -path /foo -keyName myKey -fs NAMENODE -rmdir /foo SubstringComparator Directory /foo is already in an encryption zone Test failure of Create EZ operation in an existing EZ. -fs NAMENODE -mkdir /foo -fs NAMENODE -ls /- -createZone -keyName myKey -path /foo -fs NAMENODE -mkdir /foo/bar -createZone -keyName myKey -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 -keyName myKey -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 failure of creating an EZ no path is specified. -createZone -keyName blahKey SubstringComparator You must specify a path Test failure of creating an EZ no key is specified. -createZone -path /foo SubstringComparator You must specify a key name 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 -keyName myKey -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 -keyName myKey -createZone -path /dst -keyName myKey -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 -keyName myKey -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 an EZ file into a non-EZ -fs NAMENODE -mkdir /src -fs NAMENODE -mkdir /dst -fs NAMENODE -ls /- -createZone -path /src -keyName myKey -fs NAMENODE -touchz /src/foo -fs NAMENODE -mv /src/foo /dst- -fs NAMENODE -rm /src/foo -fs NAMENODE -rmdir /src -fs NAMENODE -rmdir /dst SubstringComparator /src/foo can't be moved from an encryption zone. Test success of renaming an EZ root -fs NAMENODE -mkdir /src -createZone -path /src -keyName myKey -fs NAMENODE -mv /src /dst- -fs NAMENODE -ls /- -fs NAMENODE -rmdir /src -fs NAMENODE -rmdir /dst SubstringComparator /dst Test success of renaming file intra-EZ -fs NAMENODE -mkdir /src -createZone -path /src -keyName myKey -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