hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2110) Some StreamFile and ByteRangeInputStream cleanup
Date Thu, 30 Jun 2011 10:56:28 GMT

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

Uma Maheswara Rao G commented on HDFS-2110:
-------------------------------------------

Hi Eli,
 I just gone through the changes.
 Looks sendPartialData will not clean the streams in all the cases.
 {code}
   static void sendPartialData(FSInputStream in,
                              OutputStream out,
                              HttpServletResponse response,
                              long contentLength,
                              List<InclusiveByteRange> ranges,
                              boolean close)
      throws IOException {
    if (ranges == null || ranges.size() != 1) {
    ...............//we are not closing in this condition    ...............
    } else {
      .............
      copyFromOffset(in, out,
                     singleSatisfiableRange.getFirst(contentLength),
                     singleLength, close);
    }
  }

{code}

 So, there is a chance of leak here.

> Some StreamFile and ByteRangeInputStream cleanup
> ------------------------------------------------
>
>                 Key: HDFS-2110
>                 URL: https://issues.apache.org/jira/browse/HDFS-2110
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: name-node
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 0.23.0
>
>         Attachments: hdfs-2110-1.patch, hdfs-2110-2.patch, hdfs-2110-3.patch
>
>
> StreamFile#sendPartialData can be cleaned up, has some System.out.printlns, no javadoc,
and the byte copying method should be pulled out to IOUtils. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message