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

Oleg Zhurakousky commented on NIFI-2124:
----------------------------------------

[~vcharmcaster] I do understand what you are saying but in this particular case 
we are not creating an instance of InputStream, rather accessing and existing 
one managed by an external class
{code}
InputStream inStream = dataPacket.getData();
{code}
. . . which indirectly derives from _SiteToSiteClient_ which is closed in the 
finally block
{code}
try {
         client.close();
} catch (final IOException ioe) {
         reportError("Failed to close client", ioe);
}
{code}

Anyway, I would recommend closing this issue with "Won't fix".
Let me know if you have any issues with it.
Cheers
Oleg

> InputStream should be used in optimized way
> -------------------------------------------
>
>                 Key: NIFI-2124
>                 URL: https://issues.apache.org/jira/browse/NIFI-2124
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 0.6.1
>            Reporter: vaibhav khamgavkar
>              Labels: performance
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> I was looking into code
> found that 
> "nifi-external/nifi-spark-receiver/src/main/java/org/apache/nifi/spark/NiFiReceiver.java"
>  class dont use InputStream in optimized way.
> Usually it is good practice to close input stream and reuse variable instead 
> of creating one each time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to