[
https://issues.apache.org/jira/browse/HBASE-22476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16861635#comment-16861635
]
Xu Cang commented on HBASE-22476:
---------------------------------
Should this be closed? I saw code has been merged from github.
> HBase-backup module's class
> "org.apache.hadoop.hbase.backup.impl.BackupManifest" FSDataInputStream is not
> close.
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-22476
> URL: https://issues.apache.org/jira/browse/HBASE-22476
> Project: HBase
> Issue Type: Bug
> Components: backup&restore
> Affects Versions: 2.1.0, 2.1.4
> Reporter: lixiaobao
> Assignee: lixiaobao
> Priority: Major
> Fix For: 3.0.0
>
> Attachments: HBASE-22476.patch
>
>
> class "org.apache.hadoop.hbase.backup.impl.BackupManifest" constructe function
> public BackupManifest(FileSystem fs, Path backupPath) throws BackupException
> \{...}
> FSDataInputStream is not close after use.
> {code:java}
> //代码占位符
> 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;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)