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

truncate will fail when we use viewfilesystem

    XMLWordPrintableJSON

Details

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

    Description

      truncate will fail when use viewFS.

        @Override
        public boolean truncate(final Path f, final long newLength)
            throws IOException {
          InodeTree.ResolveResult<FileSystem> res =
              fsState.resolve(getUriPath(f), true);
          return res.targetFileSystem.truncate(f, newLength);
        }
        

      Path should be like below:
      return res.targetFileSystem.truncate(f, newLength); should be return res.targetFileSystem.truncate(res.remainingPath, newLength);

      Attachments

        1. HADOOP-13236.patch
          7 kB
          Brahma Reddy Battula
        2. HADOOP-13236-002.patch
          6 kB
          Brahma Reddy Battula
        3. HADOOP-13236-003.patch
          6 kB
          Brahma Reddy Battula
        4. HADOOP-13236-branch-2-003.patch
          6 kB
          Brahma Reddy Battula

        Activity

          People

            brahmareddy Brahma Reddy Battula
            brahmareddy Brahma Reddy Battula
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: