hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Collins (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (HADOOP-8350) Improve NetUtils.getInputStream to return a stream which has a tunable timeout
Date Thu, 03 May 2012 20:34:48 GMT

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

Eli Collins edited comment on HADOOP-8350 at 5/3/12 8:33 PM:
-------------------------------------------------------------

Agree we need this, that eg in HDFS-3357 the right approach is *not* to re-create the streams
to set a timeout. It's definitely worth adding a note wrt having a single SocketInputWrapper
per socket to NetUtils#getInputStream so callers are aware of the behavior described in SocketInputWrapper#setTimeout.
Otherwise +1, looks excellent.

                
      was (Author: eli2):
    Agree we need this, that eg in HDFS-3357 the right approach is *not* to re-create the
streams to set a timeout. It's definitely worth adding a note wrt having a single SocketInputWrapper
to NetUtils#getInputStream so callers are aware of the behavior described in SocketInputWrapper#setTimeout.
Otherwise +1, looks excellent.

                  
> Improve NetUtils.getInputStream to return a stream which has a tunable timeout
> ------------------------------------------------------------------------------
>
>                 Key: HADOOP-8350
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8350
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: util
>    Affects Versions: 1.0.0, 2.0.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>         Attachments: hadoop-8350.txt
>
>
> Currently, NetUtils.getInputStream will set the timeout on the new stream based on the
socket's configured timeout at the time of construction. After that, the timeout cannot be
changed. This causes a problem for cases like HDFS-3357. One approach used in some places
in the code is to construct new streams when the timeout has to be changed, but this can cause
bugs given that the streams are often wrapped by BufferedInputStreams.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message