[ 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