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

Daryn Sharp commented on HADOOP-8006:
-------------------------------------

We've got a case of inconsistent semantics between {{ChecksumFileSystem}} and 
other filesystems. -- there's probably even more inconsistency within those 
other filesystems.  The issue is whether it's legitimate to seek and/or skip 
past EOF on a *read-only* file.  It's completely valid to seek/skip past EOF 
for a writable stream, but I struggle to see the value in a read-only stream 
going beyond EOF.

However, POSIX does say it's ok to seek off the end of any stream.  However, 
java's skip is supposed to return the actual number of bytes skipped.  Perhaps 
we should modify {{FSDataInputStream#skip}} to enforce consistency of not 
skipping past EOF?
                
> TestFSInputChecker is failing in trunk.
> ---------------------------------------
>
>                 Key: HADOOP-8006
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8006
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.24.0
>            Reporter: Uma Maheswara Rao G
>            Assignee: Uma Maheswara Rao G
>         Attachments: HADOOP-8006.patch, HADOOP-8006.patch
>
>
> Trunk build number 939 failed with TestFSInputChecker.
> https://builds.apache.org/job/Hadoop-Hdfs-trunk/939/
> junit.framework.AssertionFailedError: expected:<10> but was:<0>
>       at junit.framework.Assert.fail(Assert.java:47)
>       at junit.framework.Assert.failNotEquals(Assert.java:283)
>       at junit.framework.Assert.assertEquals(Assert.java:64)
>       at junit.framework.Assert.assertEquals(Assert.java:130)
>       at junit.framework.Assert.assertEquals(Assert.java:136)
>       at 
> org.apache.hadoop.hdfs.TestFSInputChecker.checkSkip(TestFSInputChecker.java:194)
>       at 
> org.apache.hadoop.hdfs.TestFSInputChecker.testChecker(TestFSInputChecker.java:224)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to