test Testing basic usage SubstringComparator Usage: bin/hdfs cacheadmin [COMMAND] Testing listing no cache pools -listPools SubstringComparator Found 0 results. Testing adding a cache pool -addPool foo -removePool foo SubstringComparator Successfully added cache pool foo. Testing modifying a cache pool -addPool poolparty -owner alice -group alicegroup -mode 0000 -limit 50 -modifyPool poolparty -owner bob -group bobgroup -mode 0777 -limit 51 -listPools -removePool poolparty SubstringComparator poolparty bob bobgroup rwxrwxrwx 51 Testing deleting a cache pool -addPool foo -removePool foo SubstringComparator Successfully removed cache pool foo. Testing listing all cache pools -addPool foo -owner bob -group bob -mode 0664 -addPool bar -owner alice -group alicegroup -mode 0755 -listPools -removePool foo -removePool bar SubstringComparator Found 2 results. SubstringComparator bar alice alicegroup rwxr-xr-x unlimited SubstringComparator foo bob bob rw-rw-r-- unlimited Testing listing a single cache pool -addPool foo -owner bob -group bob -mode 0664 -addPool bar -owner alice -group alicegroup -mode 0755 -listPools foo -removePool foo -removePool bar SubstringComparator Found 1 result. SubstringComparator foo bob bob rw-rw-r-- unlimited Testing creating cache paths -addPool pool1 -addDirective -path /foo -pool pool1 -ttl 2d -addDirective -path /bar -pool pool1 -ttl 24h -addDirective -path /baz -replication 2 -pool pool1 -ttl 60m -listDirectives -pool pool1 -removePool pool1 SubstringComparator Found 3 entries SubstringComparator 1 pool1 1 SubstringComparator 2 pool1 1 SubstringComparator 3 pool1 2 Testing removing cache paths -addPool pool1 -addDirective -path /foo -pool pool1 -addDirective -path /bar -pool pool1 -removePool pool1 -listDirectives -pool pool1 SubstringComparator Found 0 entries Testing listing directives filtered by pool -addPool pool1 -addPool pool2 -addDirective -path /foo -pool pool1 -addDirective -path /bar -pool pool1 -addDirective -path /baz -pool pool2 -addDirective -path /buz -pool pool2 -listDirectives -pool pool2 -removePool pool1 -removePool pool2 SubstringComparator Found 2 entries SubstringComparator 8 pool2 1 never /baz SubstringComparator 9 pool2 1 never /buz Testing listing directives filtered by path -addPool pool1 -addPool pool2 -addDirective -path /foo -pool pool1 -addDirective -path /bar -pool pool1 -addDirective -path /foo -pool pool2 -addDirective -path /bar -pool pool2 -listDirectives -path /foo -removePool pool1 -removePool pool2 SubstringComparator Found 2 entries SubstringComparator 10 pool1 1 never /foo SubstringComparator 12 pool2 1 never /foo Testing listing directives filtered by path and pool -addPool pool1 -addPool pool2 -addDirective -path /foo -pool pool1 -addDirective -path /bar -pool pool1 -addDirective -path /foo -pool pool2 -addDirective -path /bar -pool pool2 -listDirectives -path /foo -pool pool2 -removePool pool1 -removePool pool2 SubstringComparator Found 1 entry SubstringComparator 16 pool2 1 never /foo Testing removing a directive -addPool pool1 -addDirective -path /foo -pool pool1 -addDirective -path /bar -pool pool1 -removeDirective 18 -listDirectives -removePool pool1 SubstringComparator Found 1 entry SubstringComparator 19 pool1 1 never /bar Testing removing every directive for a path -addPool pool1 -addPool pool2 -addDirective -path /foo -pool pool1 -addDirective -path /foo -pool pool1 -addDirective -path /bar -pool pool1 -addDirective -path /foo -pool pool2 -addDirective -path /bar -pool pool2 -removeDirectives -path ../../foo -listDirectives -removePool pool1 -removePool pool2 SubstringComparator Found 2 entries SubstringComparator 22 pool1 1 never /bar SubstringComparator 24 pool2 1 never /bar Testing modifying directives -addPool pool1 -addPool pool2 -addDirective -path /foo -pool pool2 -modifyDirective -id 25 -path /bar2 -modifyDirective -id 25 -pool pool1 -path /bar3 -listDirectives -path /bar3 -removePool pool1 -removePool pool2 SubstringComparator Found 1 entry SubstringComparator 25 pool1 1 never /bar3 Testing the help usage -help addPool SubstringComparator Add a new cache pool. Testing listing cache pool statistics -addPool foo -owner bob -group bob -mode 0664 -addPool bar -owner alice -group alicegroup -mode 0755 -listPools -stats -removePool foo -removePool bar SubstringComparator Found 2 results. SubstringComparator bar alice alicegroup rwxr-xr-x unlimited never 0 0 0 0 0 SubstringComparator foo bob bob rw-rw-r-- unlimited never 0 0 0 0 0 Testing listing cache directive statistics -addPool pool1 -addDirective -path /foo -pool pool1 -ttl 2d -addDirective -path /bar -pool pool1 -ttl 24h -addDirective -path /baz -replication 2 -pool pool1 -ttl 60m -listDirectives -pool pool1 -stats -removePool pool1 SubstringComparator Found 3 entries SubstringComparator /foo 0 0 0 0 SubstringComparator /bar 0 0 0 0 SubstringComparator /baz 0 0 0 0 Testing pool max ttl settings -addPool pool1 -owner andrew -group andrew -addPool pool2 -owner andrew -group andrew -maxTtl 999d -modifyPool pool2 -maxTtl never -addPool pool3 -owner andrew -group andrew -maxTtl 4h -listPools -removePool pool1 -removePool pool2 -removePool pool3 SubstringComparator Found 3 results SubstringComparator pool1 andrew andrew rwxr-xr-x unlimited never SubstringComparator pool2 andrew andrew rwxr-xr-x unlimited never SubstringComparator pool3 andrew andrew rwxr-xr-x unlimited 000:04:00:00.000 Testing setting pool unlimited limits -addPool pool1 -limit unlimited -owner andrew -group andrew -addPool pool2 -limit 10 -owner andrew -group andrew -modifyPool pool2 -limit unlimited -listPools -removePool pool1 -removePool pool2 SubstringComparator Found 2 results SubstringComparator pool1 andrew andrew rwxr-xr-x unlimited never SubstringComparator pool2 andrew andrew rwxr-xr-x unlimited never Testing listing a single cache directive -addPool pool1 -addDirective -path /foo -pool pool1 -ttl 2d -addDirective -path /bar -pool pool1 -ttl 24h -addDirective -path /baz -replication 2 -pool pool1 -ttl 60m -listDirectives -stats -id 30 -removePool pool1 SubstringComparator Found 1 entry SubstringComparator 30 pool1 1