[ 
https://issues.apache.org/jira/browse/HADOOP-14566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16059037#comment-16059037
 ] 

Steve Loughran commented on HADOOP-14566:
-----------------------------------------

-1 

{{seek()}} is actually one of the hardest things to get right; I know s3n and 
google gcs have both shipped with broken ones. 

Here you've accidentally misread seek() as taking a relative offset, when its 
actually obsolete. Because the test starts at position 0 and seeks forward 2, 
it doesn't shop up, but if you tried to seek back to position (0) after that 
read from offset 2, it would.

The first step to implementing seek would be to have SFTP add an implementation 
of {{AbstractContractSeekTest}}, which is our collected history of "things we 
got wrong in the past"

It's really good you are doing this, but like I warn: it's very hard to do 
efficiently. Tip: on a seek(pos) where pos==getPos(), make it a no-op :)

> Add seek support for SFTP FileSystem
> ------------------------------------
>
>                 Key: HADOOP-14566
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14566
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Azhagu Selvan SP
>            Priority: Minor
>         Attachments: HADOOP-14566.001.patch, HADOOP-14566.patch
>
>
> This patch adds seek() method implementation for SFTP FileSystem and a unit 
> test for the same



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to