You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Chris Douglas (JIRA)" <ji...@apache.org> on 2008/06/14 04:01:45 UTC

[jira] Commented: (HADOOP-3554) LineRecordReader needs more synchronization

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

Chris Douglas commented on HADOOP-3554:
---------------------------------------

Hi Aaron-

* Would you mind generating the patch with subversion? Other contribution guidelines are [here|http://wiki.apache.org/hadoop/HowToContribute].
* It looks like there are some annotations/comments that made it into the patch. Could you remove them?
* Though writing a test case demonstrating a race condition or synchronization issue might be difficult, do you have a way to reproduce this? Where is a LineRecordReader instance shared between threads?

> LineRecordReader needs more synchronization
> -------------------------------------------
>
>                 Key: HADOOP-3554
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3554
>             Project: Hadoop Core
>          Issue Type: Bug
>    Affects Versions: 0.17.0
>         Environment: All java platforms
>            Reporter: Aaron Greenhouse
>         Attachments: LineRecordReader.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> LineRecordReader has three index fields start, end, and pos.  All of these fields are long, which means that, in general, access to them is not atomic.  This can cause problems if the fields are accessed without appropriate synchronization.  
> I propose the following changes to the class:
> - Make the fields start and end final.  This requires some minor changes to the constructor LineRecordReader(Configuration, FileSplit).
> - Make the method getProgress() synchronized.

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