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

FilterFileSystem doesn't wrap all create() or new builder calls; may skip CRC logic

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.3, 3.3.0
    • Fix Version/s: 3.3.0
    • Component/s: fs
    • Labels:
      None
    • Target Version/s:

      Description

      LocalFS is a subclass of filterFS, but overrides create and open so that checksums are created and read.

      MAPREDUCE-7184 has thrown up that the new builder openFile() call is being forwarded to the innerFS without CRC checking. Reviewing/fixing that has shown that some of the create methods aren't being correctly wrapped, so not generating CRCs

      • createFile() builder

      The following create calls

        public FSDataOutputStream createNonRecursive(final Path f,
            final FsPermission permission,
            final EnumSet<CreateFlag> flags,
            final int bufferSize,
            final short replication,
            final long blockSize,
            final Progressable progress) throws IOException;
      
        public FSDataOutputStream create(final Path f,
            final FsPermission permission,
            final EnumSet<CreateFlag> flags,
            final int bufferSize,
            final short replication,
            final long blockSize,
            final Progressable progress,
            final Options.ChecksumOpt checksumOpt) throws IOException {
          return super.create(f, permission, flags, bufferSize, replication,
              blockSize, progress, checksumOpt);
        }
      

      This means that applications using these methods, directly or indirectly to create files aren't actually generating checksums.

      Fix: implement these methods & relay to local create calls, not to the inner FS.

        Attachments

        1. HADOOP-16107-003.patch
          21 kB
          Steve Loughran
        2. HADOOP-16107-001.patch
          20 kB
          Steve Loughran

          Issue Links

            Activity

              People

              • Assignee:
                stevel@apache.org Steve Loughran
                Reporter:
                stevel@apache.org Steve Loughran
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: