You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Gang Li (JIRA)" <ji...@apache.org> on 2013/07/21 23:42:48 UTC

[jira] [Created] (HADOOP-9753) wrong offset for the first record in index file created by fix function in MapFile

Gang Li created HADOOP-9753:
-------------------------------

             Summary: wrong offset for the first record in index file created by fix function in MapFile 
                 Key: HADOOP-9753
                 URL: https://issues.apache.org/jira/browse/HADOOP-9753
             Project: Hadoop Common
          Issue Type: Bug
          Components: io
    Affects Versions: 1.0.4
         Environment: ubuntu 12.04
jdk 7.0
hadoop-1.0.4
            Reporter: Gang Li


I want to convert a sequence file into a map file. So i used the fix function provided by MapFile to create the index file. Also i set the indexInterval as 1 since i want to index each record in the data file. However, i found that the position of the first record in the data file was incorrectly indexed by the index file. And it turns out that the fix function sets the position of the first record as 0. This is wrong because the reader of the data sequence file has already read the head and the position should be the length of the head. So, i tried to set the position as the correct value and it now works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira