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 74D7110794 for ; Tue, 23 Apr 2013 19:21:16 +0000 (UTC) Received: (qmail 15312 invoked by uid 500); 23 Apr 2013 19:21:16 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 15274 invoked by uid 500); 23 Apr 2013 19:21:16 -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 15259 invoked by uid 99); 23 Apr 2013 19:21:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 19:21:16 +0000 Date: Tue, 23 Apr 2013 19:21:15 +0000 (UTC) From: "Colin Patrick McCabe (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-9495) Define behaviour of Seekable.seek(), write tests, fix all hadoop implementations for compliance 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-9495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13639440#comment-13639440 ] Colin Patrick McCabe commented on HADOOP-9495: ---------------------------------------------- Thanks, Steve. It's good to see some effort put into validating this API contract. One thing I noticed is that Java's {{FileChannel#position}} method will happily let you seek past the end of the file with no exception or bad return value. It is only reading at this offset that will fail. That means that implementations of {{seek}} like {{LocalFSFileInputStream#seek}} which simply call this method, will have the same behavior. This corresponds to behavior {{SEEK6}} in your list. I suppose it's not incorrect by your definition, but it is surprising (to me at least). It would be nice to see this spelled out in the JavaDoc. > Define behaviour of Seekable.seek(), write tests, fix all hadoop implementations for compliance > ----------------------------------------------------------------------------------------------- > > Key: HADOOP-9495 > URL: https://issues.apache.org/jira/browse/HADOOP-9495 > Project: Hadoop Common > Issue Type: Sub-task > Components: fs > Affects Versions: 1.2.0, 3.0.0 > Reporter: Steve Loughran > Assignee: Steve Loughran > > {{Seekable.seek()}} seems a good starting point for specifying, testing and implementing FS API compliance: one method, relatively non-ambiguous semantics, easily assessed used in the Hadoop codebase. Specify and test it first -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira