Tianyin Xu created HDFS-10456:
---------------------------------

             Summary: 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


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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to