[
https://issues.apache.org/jira/browse/HADOOP-7316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044134#comment-13044134
]
Eli Collins commented on HADOOP-7316:
-------------------------------------
Depends on the underlying InputStream. read (and readFully) result in a call to
seek, which in the case of DFSInputStream throws an IOException if you try to
seek past the length of the files. FSInputStream#readFully however throws an
EOFException if the underlying call to read failed while FSInputStream#read
will return whatever value the underlying call to read returned (will not throw
an EOFException). So, per the javadoc, you only get the EOFException with
readFully if you hit the EOF while reading.
DFSInputStream#seek should really throw an EOFException if seeking beyond the
end of stream, but changing it to do that now would break compatibility =(
> Add public javadocs to FSDataInputStream and FSDataOutputStream
> ---------------------------------------------------------------
>
> Key: HADOOP-7316
> URL: https://issues.apache.org/jira/browse/HADOOP-7316
> Project: Hadoop Common
> Issue Type: Improvement
> Components: documentation
> Reporter: Jonathan Hsieh
> Assignee: Eli Collins
> Fix For: 0.23.0
>
> Attachments: hadoop-7316-1.patch, hadoop-7316-2.patch,
> hadoop-7316-3.patch
>
>
> This is a method made public for testing. In comments in HADOOP-7301 after
> commit, adding javadoc comments was requested. This is a follow up jira to
> address it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira