Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11342

Fix FileInputStream leak in loadLastPartialChunkChecksum

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha2
    • 3.0.0-alpha2
    • datanode
    • None
    • Reviewed

    Description

      FsVolumeImpl#loadLastPartialChunkChecksum leaks a FileInputStream here:

        @Override
        public byte[] loadLastPartialChunkChecksum(
            File blockFile, File metaFile) throws IOException {
          // readHeader closes the temporary FileInputStream.
          DataChecksum dcs = BlockMetadataHeader
              .readHeader(fileIoProvider.getFileInputStream(this, metaFile))
              .getChecksum();
      

      Attachments

        1. HDFS-11342.001.patch
          1 kB
          Chen Liang

        Issue Links

          Activity

            People

              vagarychen Chen Liang
              arp Arpit Agarwal
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: