Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 306E311F87 for ; Fri, 25 Apr 2014 07:10:29 +0000 (UTC) Received: (qmail 8855 invoked by uid 500); 25 Apr 2014 07:10:21 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 8592 invoked by uid 500); 25 Apr 2014 07:10:16 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 8464 invoked by uid 99); 25 Apr 2014 07:10:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2014 07:10:15 +0000 Date: Fri, 25 Apr 2014 07:10:15 +0000 (UTC) From: "Liang Xie (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-6286) adding a timeout setting for local read io MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Liang Xie created HDFS-6286: ------------------------------- Summary: adding a timeout setting for local read io Key: HDFS-6286 URL: https://issues.apache.org/jira/browse/HDFS-6286 Project: Hadoop HDFS Issue Type: Improvement Components: hdfs-client Affects Versions: 2.4.0, 3.0.0 Reporter: Liang Xie Assignee: Liang Xie Currently, if a write or remote read requested into a sick disk, DFSClient.hdfsTimeout could help the caller have a guaranteed time cost to return back. but it doesn't work on local read. Take HBase scan for example, DFSInputStream.read -> readWithStrategy -> readBuffer -> BlockReaderLocal.read -> dataIn.read -> FileChannelImpl.read if it hits a bad disk, the low read io probably takes tens of seconds, and what's worse is, the "DFSInputStream.read" hold a lock always. Per my knowledge, there's no good mechanism to cancel a running read io(Please correct me if it's wrong), so my opinion is adding a future around the read request, and we could set a timeout there, if the threshold reached, we can add the local node into deadnode probably... Any thought? -- This message was sent by Atlassian JIRA (v6.2#6252)