hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tianyin Xu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-10456) Print out the file path when the writes on snapshots are denied
Date Wed, 25 May 2016 01:30:13 GMT
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-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org


Mime
View raw message