You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Sean Busbey (JIRA)" <ji...@apache.org> on 2018/08/15 14:03:00 UTC

[jira] [Commented] (HBASE-21056) BucketCache.persistToFile may fail to clean up java.io.OutputStream

    [ https://issues.apache.org/jira/browse/HBASE-21056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16581112#comment-16581112 ] 

Sean Busbey commented on HBASE-21056:
-------------------------------------

the complained about section uses a try-with-resources

{code}
private void persistToFile() throws IOException {
    assert !cacheEnabled;
    if (!ioEngine.isPersistent()) {
      throw new IOException("Attempt to persist non-persistent cache mappings!");
    }
    try (FileOutputStream fos = new FileOutputStream(persistencePath, false)) {
      fos.write(ProtobufMagic.PB_MAGIC);
      BucketProtoUtils.toPB(this).writeDelimitedTo(fos);
    }
  }

{code}

lemme see if the full report has more details

> BucketCache.persistToFile may fail to clean up java.io.OutputStream 
> --------------------------------------------------------------------
>
>                 Key: HBASE-21056
>                 URL: https://issues.apache.org/jira/browse/HBASE-21056
>             Project: HBase
>          Issue Type: Bug
>          Components: BucketCache
>    Affects Versions: 3.0.0
>            Reporter: Sean Busbey
>            Priority: Critical
>
> Found by the nightly job via FindBugs:
> {code}
> FindBugs	module:hbase-server
> org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.persistToFile() may fail to clean up java.io.OutputStream Obligation to clean up resource created at BucketCache.java:up java.io.OutputStream Obligation to clean up resource created at BucketCache.java:[line 1089] is not discharged
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)