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

Remove stale method ViewFileSystem#getTrashCanLocation

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha2
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: viewfs
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Incompatible change
    • Release Note:
      The unused method getTrashCanLocation has been removed. This method has long been superceded by FileSystem#getTrashRoot.

      Description

      ViewFileSystem which extends FileSystem has a public method getTrashCanLocation which is neither overridden nor used by anybody. Looks like it existed when the file was created, and also I see the implementation returning homeDirectory which might not be the expected one in cases of expunge. So, inclined to remove this stale and potentially dangerous method unless anyone has any concerns.

        public Path getTrashCanLocation(final Path f) throws FileNotFoundException {
          final InodeTree.ResolveResult<FileSystem> res = 
            fsState.resolve(getUriPath(f), true);
          return res.isInternalDir() ? null : res.targetFileSystem.getHomeDirectory();
        }
      

        Attachments

        1. HADOOP-13721.01.patch
          1.0 kB
          Manoj Govindassamy

          Activity

            People

            • Assignee:
              manojg Manoj Govindassamy
              Reporter:
              manojg Manoj Govindassamy
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: