[
https://issues.apache.org/jira/browse/HADOOP-2288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546838
]
Doug Cutting commented on HADOOP-2288:
--------------------------------------
This looks mostly good to me.
This patch should implement the new API for the local filesystem. It'd be good
to include at least one implementation, to make sure that it is easily and
usefully implementable. Adding some tests for that implementation would also
be good.
We should not throw UnsupportedOperationException from the the default
implementation of chmod, chown, chgrp, etc. The API will be easier to use if
the default is to do nothing. That way one can, e.g., set permissions in
JobClient without adding exception handling to ignore this exception. We want
applications to still work with FileSystems that don't implement protections,
and want folks to write FileSystem-independent code. Every application would
end up ignoring these exceptions, so it would be best to not throw them in the
first place.
Perhaps these methods can return a boolean indicating success, so that if an
application really cares it can tell, but that might be even more confusing.
We want FileSystems that implement the API to throw exceptions when a
protection operation fails, not return false. So false should only be returned
if the FileSystem doesn't implement protections at all. My vote would be to
leave them returning void and have the default implementation do nothing.
A few nits:
- all public and protected elements need javadoc.
- the naming style FsFoo is preferred to FSFoo
> Change FileSystem API to support access control.
> ------------------------------------------------
>
> Key: HADOOP-2288
> URL: https://issues.apache.org/jira/browse/HADOOP-2288
> Project: Hadoop
> Issue Type: New Feature
> Components: fs
> Affects Versions: 0.15.0
> Reporter: Tsz Wo (Nicholas), SZE
> Assignee: Tsz Wo (Nicholas), SZE
> Fix For: 0.16.0
>
> Attachments: 2288_20071128b.patch
>
>
> - Some FileSystem methods like create and mkdir need an additional parameter
> for permission.
> - FileSystem has to provide methods for setting permission, changing
> ownership, etc.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.