Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-22476

HBase-backup module's class "org.apache.hadoop.hbase.backup.impl.BackupManifest" FSDataInputStream is not close.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0, 2.1.4
    • 3.0.0-alpha-1
    • backup&restore
    • None

    Description

      class "org.apache.hadoop.hbase.backup.impl.BackupManifest" constructe function

      public BackupManifest(FileSystem fs, Path backupPath) throws BackupException {...} 

      FSDataInputStream is not close after use.

      //代码占位符
      if (subFile.getPath().getName().equals(MANIFEST_FILE_NAME)) {
        // load and set manifest field from file content
        FSDataInputStream in = fs.open(subFile.getPath());
        long len = subFile.getLen();
        byte[] pbBytes = new byte[(int) len];
        in.readFully(pbBytes);
        BackupProtos.BackupImage proto = null;
        try {
          proto = BackupProtos.BackupImage.parseFrom(pbBytes);
        } catch (Exception e) {
          throw new BackupException(e);
        }
        this.backupImage = BackupImage.fromProto(proto);
        LOG.debug("Loaded manifest instance from manifest file: "
            + BackupUtils.getPath(subFile.getPath()));
        return;
      }
      

      Attachments

        1. HBASE-22476.patch
          1 kB
          lixiaobao

        Issue Links

          Activity

            People

              q977734161 lixiaobao
              q977734161 lixiaobao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: