Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 82C9DC99C for ; Thu, 3 May 2012 20:35:13 +0000 (UTC) Received: (qmail 60727 invoked by uid 500); 3 May 2012 20:35:12 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 60673 invoked by uid 500); 3 May 2012 20:35:12 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 60659 invoked by uid 99); 3 May 2012 20:35:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2012 20:35:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2012 20:35:09 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5911742E8E9 for ; Thu, 3 May 2012 20:34:48 +0000 (UTC) Date: Thu, 3 May 2012 20:34:48 +0000 (UTC) From: "Eli Collins (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <767054873.23658.1336077288397.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <344725480.20500.1336022278455.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HADOOP-8350) Improve NetUtils.getInputStream to return a stream which has a tunable timeout MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-8350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13267780#comment-13267780 ] Eli Collins commented on HADOOP-8350: ------------------------------------- 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