You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "lixiaobao (JIRA)" <ji...@apache.org> on 2019/05/27 00:33:00 UTC
[jira] [Updated] (HBASE-22476) HBase-backup module's class
"org.apache.hadoop.hbase.backup.impl.BackupManifest" FSDataInputStream is
not close.
[ https://issues.apache.org/jira/browse/HBASE-22476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
lixiaobao updated HBASE-22476:
------------------------------
Attachment: HBASE-22476.patch
Status: Patch Available (was: Open)
> 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.4, 2.1.0
> 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)