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

Fix FileInputStream leak in loadLastPartialChunkChecksum

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha2
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: datanode
    • Labels:
      None
    • Hadoop Flags:
      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

          Issue Links

            Activity

              People

              • Assignee:
                vagarychen Chen Liang
                Reporter:
                arpitagarwal Arpit Agarwal
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: