Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13201

Print the directory paths when ViewFs denies the rename operation on internal dirs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.2
    • 2.8.0, 2.7.4, 3.0.0-alpha2
    • viewfs
    • None
    • Reviewed

    Description

      With ViewFs, the delete and rename operations on internal dirs are denied by throwing AccessControlException.

      Unlike the delete() which notify the internal dir path, rename does not.

      The attached patch appends the directory path on the logged exception.

      ViewFs.java
           InodeTree.ResolveResult<AbstractFileSystem> resSrc = 
             fsState.resolve(getUriPath(src), false); 
           if (resSrc.isInternalDir()) {
             throw new AccessControlException(
      -          "Cannot Rename within internal dirs of mount table: it is readOnly");
      +          "Cannot Rename within internal dirs of mount table: it is readOnly"
      +          + src);
           }
             
           InodeTree.ResolveResult<AbstractFileSystem> resDst = 
                                       fsState.resolve(getUriPath(dst), false);
           if (resDst.isInternalDir()) {
             throw new AccessControlException(
      -          "Cannot Rename within internal dirs of mount table: it is readOnly");
      +          "Cannot Rename within internal dirs of mount table: it is readOnly"
      +          + dst);
           }
      

      Attachments

        1. HADOOP-13201.000.patch
          1 kB
          Tianyin Xu
        2. HADOOP-13201-001.patch
          2 kB
          Rakesh Radhakrishnan

        Activity

          People

            rakeshr Rakesh Radhakrishnan
            tianyin Tianyin Xu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: