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 -weight 50
-modifyPool poolparty -owner bob -group bobgroup -mode 0777 -weight 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 100
SubstringComparator
foo bob bob rw-rw-r-- 100
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-- 100
Testing creating cache paths
-addPool pool1
-addDirective -path /foo -pool pool1
-addDirective -path /bar -pool pool1
-addDirective -path /baz -replication 2 -pool pool1
-listDirectives -pool pool1
-removePool pool1
SubstringComparator
Found 3 entries
SubstringComparator
1 pool1 /foo
SubstringComparator
2 pool1 /bar
SubstringComparator
3 pool1 /baz
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 /baz
SubstringComparator
9 pool2 /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 /foo
SubstringComparator
12 pool2 /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 /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 /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 /bar
SubstringComparator
24 pool2 /bar