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

Jay Booth updated HADOOP-6196:
------------------------------

    Attachment: sync-bug.patch

Here's the patch.  To reproduce the problem, patch, then revert SequenceFile 
(to undo the fix) and run the attached test TestSequenceFileSync.  

Strangely, it works sometimes and breaks other times.  When it works, it'll 
tend to work for a few times in a row until a few seconds pass and then it 
starts breaking again (EOFException at readInt).  I don't get it, could be 
something weird with my environment, but the patch to SequenceFile means that 
it works all the time, so who cares :)  

The fix required bumping the version of SequenceFile from 6 to 7, writing the 
SYNC_ESCAPE int properly before writing the sync block at the end of the header 
file, and then scanning past that prior to loading sync when opening.  Now 
sync(0); next();  works properly.

> sync(0); next() breaks SequenceFile
> -----------------------------------
>
>                 Key: HADOOP-6196
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6196
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Jay Booth
>         Attachments: sync-bug.patch
>
>
> Currently, the end of the SequenceFile header is a sync block that isn't 
> prefaced with SYNC_ESCAPE.  This means that sync(0) followed by next() fails. 
>  Patch w/ test attached, bumps VERSION from 6 to 7.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to