[ 
https://issues.apache.org/jira/browse/MAPREDUCE-1519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836514#action_12836514
 ] 

Rodrigo Schmidt commented on MAPREDUCE-1519:
--------------------------------------------

Sure, Dhruba!

Let's assume there's a file /usr/schmidt/file1 that has been recently raided. 
In that case, the RaidNode will have crated a parity file 
/raid/usr/schmidt/file1

Now, imagine the user rewrites its original file and creates a new version of 
/usr/schmidt/file1.

The RaidNode correctly identifies the file has to be re-raided, creates the 
parity file in a temporary directory, but when it tries to move the newly 
created parity file from the temporary directory to /raid/usr/schmidt/file1, it 
fails because the destination already exists. 

The patch verifies if the destination exists before renaming it and deletes the 
file in that case.

The unit test covers this scenario.

I actually found this bug when you proposed to add the unit test that covers 
this scenario on my patch to MAPREDUCE-1510. I didn't want to fix this bug 
there because (i) MAPREDUCE-1510 was an improvement and not a bug, and (ii) 
neither the title or the description of MAPREDUCE-1510 covers this failure 
scenario and people looking for this problem would have a hard time finding the 
correct JIRA.

> RaidNode fails to create new parity file if an older version already exists
> ---------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1519
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1519
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: contrib/raid
>            Reporter: Rodrigo Schmidt
>            Assignee: Rodrigo Schmidt
>         Attachments: MAPREDUCE-1519.patch
>
>
> When RaidNode tries to recreate a parity file for a source file that has been 
> modified (recreated) recently, it crashes.

-- 
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