[ https://issues.apache.org/jira/browse/HADOOP-13192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15338998#comment-15338998 ]
Mingliang Liu commented on HADOOP-13192: ---------------------------------------- Hi [~zhudebin], the failing test is a known bug, see [HADOOP-12588]. This is an intermittent failing unit test (UT) so you may not reproduce it consistently on your local machine. I had a look at the patch and think it is an unrelated failure UT. So when contributing patches and review the pre-commit Jenkins report, you can generally check if the failing tests are related. If unrelated, you can search JIRA ticket that reports it and comment about it here. You can file another bug for tracking the failing UTs if no one has reported it yet. Thanks for the contribution. > org.apache.hadoop.util.LineReader match recordDelimiter has a bug > ------------------------------------------------------------------ > > Key: HADOOP-13192 > URL: https://issues.apache.org/jira/browse/HADOOP-13192 > Project: Hadoop Common > Issue Type: Bug > Components: util > Affects Versions: 2.6.2 > Reporter: binde > Assignee: binde > Attachments: > 0001-HADOOP-13192-org.apache.hadoop.util.LineReader-match.patch, > 0002-fix-bug-hadoop-1392-add-test-case-for-LineReader.patch > > Original Estimate: 5m > Remaining Estimate: 5m > > org.apache.hadoop.util.LineReader.readCustomLine() has a bug, > when line is aaaabccc, recordDelimiter is aaab, the result should be a,ccc, > show the code on line 310: > for (; bufferPosn < bufferLength; ++bufferPosn) { > if (buffer[bufferPosn] == recordDelimiterBytes[delPosn]) { > delPosn++; > if (delPosn >= recordDelimiterBytes.length) { > bufferPosn++; > break; > } > } else if (delPosn != 0) { > bufferPosn--; > delPosn = 0; > } > } > shoud be : > for (; bufferPosn < bufferLength; ++bufferPosn) { > if (buffer[bufferPosn] == recordDelimiterBytes[delPosn]) { > delPosn++; > if (delPosn >= recordDelimiterBytes.length) { > bufferPosn++; > break; > } > } else if (delPosn != 0) { > // ------------- change here ------------- start ---- > bufferPosn -= delPosn; > // ------------- change here ------------- end ---- > > delPosn = 0; > } > } -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org