[ 
https://issues.apache.org/jira/browse/HADOOP-9495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Loughran updated HADOOP-9495:
-----------------------------------

    Attachment: HADOOP-9545-002.patch

tweaked spec and whitespace purge. There are not tests here; that will follow 
if everyone is happy with the spec.

Code-wise, I plan to add a consistent static method to check the args on the 
read/positioned read (byte[],off,len) methods, and have those implementations 
that throw IOExceptions on {{seek()}} to throw {{EOFException}}

On {{BufferedFSInputStream}} I plan to have an {{IOException}} raised on a seek 
to a -ve offset (unless we explicitly want {{seek(X) | X<0}} to be a no-op, in 
which case it needs consistent implementation in testing. 

We can also go through all {{Seekable().seek()}} operations and have them 
convert the special case where the seek target=={{getPos()}} to be a no-op.
                
> 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
>         Attachments: HADOOP-9495.patch, HADOOP-9545-002.patch
>
>
> {{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

Reply via email to