HDFS-13785. EC: 'removePolicy' is not working for built-in/system Erasure Code policies. Contributed by Ayush Saxena
This commit is contained in:
parent
754069906b
commit
a517ee4f5b
|
@ -154,7 +154,7 @@ public class ECAdmin extends Configured implements Tool {
|
||||||
listing.addRow("<file>",
|
listing.addRow("<file>",
|
||||||
"The path of the xml file which defines the EC policies to add");
|
"The path of the xml file which defines the EC policies to add");
|
||||||
return getShortUsage() + "\n" +
|
return getShortUsage() + "\n" +
|
||||||
"Add a list of erasure coding policies.\n" +
|
"Add a list of user defined erasure coding policies.\n" +
|
||||||
listing.toString();
|
listing.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ public class ECAdmin extends Configured implements Tool {
|
||||||
TableListing listing = AdminHelper.getOptionDescriptionListing();
|
TableListing listing = AdminHelper.getOptionDescriptionListing();
|
||||||
listing.addRow("<policy>", "The name of the erasure coding policy");
|
listing.addRow("<policy>", "The name of the erasure coding policy");
|
||||||
return getShortUsage() + "\n" +
|
return getShortUsage() + "\n" +
|
||||||
"Remove an erasure coding policy.\n" +
|
"Remove an user defined erasure coding policy.\n" +
|
||||||
listing.toString();
|
listing.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ Below are the details about each command.
|
||||||
|
|
||||||
* `[-addPolicies -policyFile <file>]`
|
* `[-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]`
|
* `[-listCodecs]`
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ Below are the details about each command.
|
||||||
|
|
||||||
* `[-removePolicy -policy <policyName>]`
|
* `[-removePolicy -policy <policyName>]`
|
||||||
|
|
||||||
Remove an erasure coding policy.
|
Remove an user defined erasure coding policy.
|
||||||
|
|
||||||
* `[-enablePolicy -policy <policyName>]`
|
* `[-enablePolicy -policy <policyName>]`
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@
|
||||||
<comparators>
|
<comparators>
|
||||||
<comparator>
|
<comparator>
|
||||||
<type>SubstringComparator</type>
|
<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>
|
||||||
<comparator>
|
<comparator>
|
||||||
<type>SubstringComparator</type>
|
<type>SubstringComparator</type>
|
||||||
|
@ -163,6 +163,26 @@
|
||||||
</comparators>
|
</comparators>
|
||||||
</test>
|
</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 <policy>]</expected-output>
|
||||||
|
</comparator>
|
||||||
|
</comparators>
|
||||||
|
</test>
|
||||||
|
|
||||||
<test>
|
<test>
|
||||||
<description>help: enablePolicy command</description>
|
<description>help: enablePolicy command</description>
|
||||||
<test-commands>
|
<test-commands>
|
||||||
|
|
Loading…
Reference in New Issue