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

Wilfred Spiegelenburg commented on MAPREDUCE-6549:
--------------------------------------------------

[~zxu] The change in MAPREDUCE-6481 is not to blame for the duplicate records 
as far as I can tell. It fixed things and now we get to see what is there and 
thus we noticed the duplicates. I did not look at the compressed input, and I 
do think you are correct. Compressed input uses the same steps and we should 
clear the setting in the same way as we did the uncompressed stream. I will try 
to generate a compressed stream that is splittable to get a test case. I will 
upload a new patch but I will first try to generate the test case before I do 
that.

[~cotedm] An EOF will automatically terminate the record there is no need for a 
record delimiter at the end of the file. All the test, and comments in the code 
show it. The assumption is that the last record before EOF does not need a 
record terminator. It is not a new assumption, assuming that an EOF would not 
delimit a record would be counter intuitive. Most text files for instance do 
not have a newline at the last line.

> multibyte delimiters with LineRecordReader cause duplicate records
> ------------------------------------------------------------------
>
>                 Key: MAPREDUCE-6549
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6549
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: mrv1, mrv2
>    Affects Versions: 2.7.2
>            Reporter: Dustin Cote
>            Assignee: Wilfred Spiegelenburg
>         Attachments: MAPREDUCE-6549-1.patch, MAPREDUCE-6549-2.patch
>
>
> LineRecorderReader currently produces duplicate records under certain 
> scenarios such as:
> 1) input string: "abc+++def++ghi++" 
> delimiter string: "+++" 
> test passes with all sizes of the split 
> 2) input string: "abc++def+++ghi++" 
> delimiter string: "+++" 
> test fails with a split size of 4 
> 2) input string: "abc+++def++ghi++" 
> delimiter string: "++" 
> test fails with a split size of 5 
> 3) input string "abc+++defg++hij++" 
> delimiter string: "++" 
> test fails with a split size of 4 
> 4) input string "abc++def+++ghi++" 
> delimiter string: "++" 
> test fails with a split size of 9 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to