HDFS-13785. EC: 'removePolicy' is not working for built-in/system Erasure Code policies. Contributed by Ayush Saxena

This commit is contained in:
Vinayakumar B 2018-08-08 12:42:20 +05:30 committed by Arpit Agarwal
parent 754069906b
commit a517ee4f5b
3 changed files with 25 additions and 5 deletions

View File

@ -154,7 +154,7 @@ public class ECAdmin extends Configured implements Tool {
listing.addRow("<file>",
"The path of the xml file which defines the EC policies to add");
return getShortUsage() + "\n" +
"Add a list of erasure coding policies.\n" +
"Add a list of user defined erasure coding policies.\n" +
listing.toString();
}
@ -268,7 +268,7 @@ public class ECAdmin extends Configured implements Tool {
TableListing listing = AdminHelper.getOptionDescriptionListing();
listing.addRow("<policy>", "The name of the erasure coding policy");
return getShortUsage() + "\n" +
"Remove an erasure coding policy.\n" +
"Remove an user defined erasure coding policy.\n" +
listing.toString();
}

View File

@ -203,7 +203,7 @@ Below are the details about each command.
* `[-addPolicies -policyFile <file>]`
Add a list of erasure coding policies. Please refer etc/hadoop/user_ec_policies.xml.template for the example policy file. The maximum cell size is defined in property 'dfs.namenode.ec.policies.max.cellsize' with the default value 4MB. Currently HDFS allows the user to add 64 policies in total, and the added policy ID is in range of 64 to 127. Adding policy will fail if there are already 64 policies added.
Add a list of user defined erasure coding policies. Please refer etc/hadoop/user_ec_policies.xml.template for the example policy file. The maximum cell size is defined in property 'dfs.namenode.ec.policies.max.cellsize' with the default value 4MB. Currently HDFS allows the user to add 64 policies in total, and the added policy ID is in range of 64 to 127. Adding policy will fail if there are already 64 policies added.
* `[-listCodecs]`
@ -211,7 +211,7 @@ Below are the details about each command.
* `[-removePolicy -policy <policyName>]`
Remove an erasure coding policy.
Remove an user defined erasure coding policy.
* `[-enablePolicy -policy <policyName>]`

View File

@ -154,7 +154,7 @@
<comparators>
<comparator>
<type>SubstringComparator</type>
<expected-output>Add a list of erasure coding policies</expected-output>
<expected-output>Add a list of user defined erasure coding policies</expected-output>
</comparator>
<comparator>
<type>SubstringComparator</type>
@ -163,6 +163,26 @@
</comparators>
</test>
<test>
<description>help: removePolicy command</description>
<test-commands>
<ec-admin-command>-fs NAMENODE -help removePolicy
</ec-admin-command>
</test-commands>
<cleanup-commands>
</cleanup-commands>
<comparators>
<comparator>
<type>SubstringComparator</type>
<expected-output>Remove an user defined erasure coding policy</expected-output>
</comparator>
<comparator>
<type>SubstringComparator</type>
<expected-output>[-removePolicy -policy &lt;policy&gt;]</expected-output>
</comparator>
</comparators>
</test>
<test>
<description>help: enablePolicy command</description>
<test-commands>