[
https://issues.apache.org/jira/browse/HADOOP-9713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098039#comment-17098039
]
Mikhail Pryakhin commented on HADOOP-9713:
------------------------------------------
[[email protected]]
That's a great Idea, but [the method JavaDoc
claims|https://github.com/apache/hadoop/blob/ba66f3b454a5f6ea84f2cf7ac0082c555e2954a7/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/PositionedReadable.java#L59]
that file offset is not changed after the method invocation. This means we
have to seek back to the initial position to leave the file offset unchanged,
don't we?
> FSDataInputStream.readFully doesn't work on filesystems without seek -even
> when the offset==getPos
> --------------------------------------------------------------------------------------------------
>
> Key: HADOOP-9713
> URL: https://issues.apache.org/jira/browse/HADOOP-9713
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.1.0-beta, 1.3.0, 3.0.0-alpha1
> Reporter: Steve Loughran
> Priority: Minor
>
> {{FSDataInputStream.readFully(offset,data)}} doesn't work even if the
> offset==the current location -because it always seeks to the offset and seeks
> back. No seek => Exception.
> We could optimise {{FSDataInputStream.readFully(offset,data)}} to eliminate
> the seeks on these operations -which would have tangible benefits for those
> filesystems where seek is expensive (remote blobstores). It would also let
> you use readFully against filesystems without seeks, provided you are only
> reading from the current location.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]