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 "Hudson (JIRA)" <ji...@apache.org> on 2016/06/20 08:16:05 UTC

[jira] [Commented] (HADOOP-13192) org.apache.hadoop.util.LineReader cannot handle multibyte delimiters correctly

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

Hudson commented on HADOOP-13192:
---------------------------------

SUCCESS: Integrated in Hadoop-trunk-Commit #9985 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/9985/])
HADOOP-13192. org.apache.hadoop.util.LineReader cannot handle multibyte (aajisaka: rev fc6b50cc574e144fd314dea6c11987c6a384bfa6)
* hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestLineReader.java
* hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/LineReader.java


> org.apache.hadoop.util.LineReader cannot handle multibyte delimiters correctly
> ------------------------------------------------------------------------------
>
>                 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
>            Priority: Critical
>             Fix For: 2.7.3
>
>         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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org