[ https://issues.apache.org/jira/browse/HDFS-4148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495527#comment-13495527 ]
Aaron T. Myers commented on HDFS-4148: -------------------------------------- bq. WAFL and ZFS need to support Posix interface/errorno which doesn't have a corresponding code for snapshot related errors. Agree, though it's a good data point. WAFL/ZFS could have chosen to use EPERM (i.e. operation not permitted) but they didn't - they chose to use regular old EACCESS. This makes sense because most client programs don't care much about why they can't access a file, just that they can't. bq. But here, we have the flexibility and not confined by Posix interface. And thus DFSClient can better handle errors based on the explicate exception for snapshot. Can it? What can the DFSClient do differently based on this? This patch doesn't in fact cause the DFSClient to behave any differently based on a SnapshotException or AccessControlException being thrown. If we separate the two, I suspect what you'll find is that a fair number of user programs will end up writing identical error handling code for both exceptions, which is a shame. I think we should reserve SnapshotException for truly snapshot-related exceptions, as is currently done on the branch, e.g. when the user can't created or delete a snapshot for some reason. > disallow modification on RO snapshots > -------------------------------------- > > Key: HDFS-4148 > URL: https://issues.apache.org/jira/browse/HDFS-4148 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: name-node > Affects Versions: Snapshot (HDFS-2802) > Reporter: Brandon Li > Assignee: Brandon Li > Attachments: HDFS-4148.patch, HDFS-4148.patch > > > disallow modification on RO snapshots, including create, append, > setReplication/Permission/Owner, rename, delete, makedir, setQuota/Time, > createSymlink. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira