[
https://issues.apache.org/jira/browse/HDFS-13806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16594562#comment-16594562
]
Xiao Chen commented on HDFS-13806:
----------------------------------
Thanks for the ping [~vinayrpet], this indeed fell out of my radar.
The proposal makes sense and is for a good cause - caller is expected to do
this only on EC dirs. It is also closer to the existing removexattr behavior.
Problem is, there is no API to 'list all EC dirs'.... So one would need to do a
ls -R, then either -getPolicy + unset based on the getPolicy return, or unset
all dirs regardlessly. Both case seems likely and we cannot control what admins
choose. :(
How about we still fix this in trunk, but mark it as incompatible?
A code review comment on the test: since we're editing existing tests, I don't
think an explicit test for the exception is necessary. For the changes to
existing test, suggest to have {{Assert.fail}} after unset to make sure it
really throws - currently the test will pass either way.
> EC: No error message for unsetting EC policy of the directory inherits the
> erasure coding policy from an ancestor directory
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: HDFS-13806
> URL: https://issues.apache.org/jira/browse/HDFS-13806
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: erasure-coding
> Affects Versions: 3.0.0
> Environment: 3 Node SUSE Linux cluster
> Reporter: Souryakanta Dwivedy
> Assignee: Ayush Saxena
> Priority: Minor
> Attachments: HDFS-13806-01.patch, HDFS-13806-02.patch,
> HDFS-13806-03.patch, No_error_unset_ec_policy.png
>
>
> No error message thrown for unsetting EC policy of the directory inherits the
> erasure coding policy from an ancestor directory
> Steps :-
> --------------
> * Create a Directory
> - Set EC policy for the Directory
> - Create a file in-side that Directory
> - Create a sub-directory inside the parent directory
> - Check both the file and sub-directory inherit the EC policy from parent
> directory
> - Try to unset EC Policy for the file and check it will throw error as [
> Cannot unset an erasure coding policy on a file]
> - Try to unset EC Policy for the sub-directory and check it will throw a
> success message as [Unset erasure coding policy from <path>]
> instead of throwing the error message,which is wrong behavior
> Actual output :-
> No proper error message thrown for unsetting EC policy of the directory
> inherits the erasure coding policy from an ancestor directory
> A success message is displayed instead of throwing an error message
> Expected output :-
>
> Proper error message should be thrown while trying to unset EC policy of the
> directory inherits the erasure coding policy from an ancestor directory
> like error message thrown while unsetting the EC policy of a file inherits
> the erasure coding policy from an ancestor directory
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]