[
https://issues.apache.org/jira/browse/HDFS-10456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tianyin Xu updated HDFS-10456:
------------------------------
Attachment: HDFS-10456.000.patch
Patch against trunk
> Print out the file path when the writes on snapshots are denied
> ---------------------------------------------------------------
>
> Key: HDFS-10456
> URL: https://issues.apache.org/jira/browse/HDFS-10456
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Affects Versions: 2.7.2
> Reporter: Tianyin Xu
> Attachments: HDFS-10456.000.patch
>
>
> In {{getINodesInPath4Write}}, the writes on snapshots are denied by throwing
> {{SnapshotAccessControlException}}.
> Unlike other file operations that print out the file path upon failure,
> {{getINodesInPath4Write}} does not.
> The attached patch appends the directory path on the logged exception.
> {code:title=ViewFs.java|borderStyle=solid}
> if (inodesInPath.isSnapshot()) {
> throw new SnapshotAccessControlException(
> - "Modification on a read-only snapshot is disallowed");
> + "Modification on a read-only snapshot is disallowed: "
> + + inodesInPath.getPath());
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]