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 52BAA19F6F for ; Thu, 7 Apr 2016 19:15:26 +0000 (UTC) Received: (qmail 78396 invoked by uid 500); 7 Apr 2016 19:15:26 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 78345 invoked by uid 500); 7 Apr 2016 19:15:26 -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 78324 invoked by uid 99); 7 Apr 2016 19:15:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2016 19:15:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C64532C1F61 for ; Thu, 7 Apr 2016 19:15:25 +0000 (UTC) Date: Thu, 7 Apr 2016 19:15:25 +0000 (UTC) From: "Steve Loughran (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-12994) Specify PositionedReadable, add contract tests, fix problems 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-12994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15230857#comment-15230857 ] Steve Loughran commented on HADOOP-12994: ----------------------------------------- As an aside, I was thinking we could just modify {{FSInputStreamread(long position, byte[] buffer, int offset, int length))}} to catch an EOF exception and downgrade. With azure, there's now two classes that handle EOF specially; I think swift will need it too. Put it all in one place, and there's one code path that everything picks up. *I can't see how, on any FS, catching an EOF exception on the seek or read and downgrading to a -1 would be a mistake* Remember: the param validation of seeking < 0 has already taken place, so the only way an EOF could be raised is if they went off the end and the FS raises EOFs here. For which catch and downgrade is the required action > Specify PositionedReadable, add contract tests, fix problems > ------------------------------------------------------------ > > Key: HADOOP-12994 > URL: https://issues.apache.org/jira/browse/HADOOP-12994 > Project: Hadoop Common > Issue Type: Improvement > Components: fs > Affects Versions: 2.8.0 > Reporter: Steve Loughran > Assignee: Steve Loughran > Attachments: HADOOP-12994-001.patch, HADOOP-12994-002.patch, HADOOP-12994-003.patch > > > Some work on S3a has shown up that there aren't tests catching regressions in readFully, reviewing the documentation shows that its specification could be improved. > # review the spec > # review the implementations > # add tests (proposed: to the seek contract; streams which support seek should support positioned readable) > # fix code, where it differs significantly from HDFS or LocalFS -- This message was sent by Atlassian JIRA (v6.3.4#6332)