Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AB274200B40 for ; Fri, 17 Jun 2016 08:03:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A9CCC160A51; Fri, 17 Jun 2016 06:03:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F35AB160A52 for ; Fri, 17 Jun 2016 08:03:06 +0200 (CEST) Received: (qmail 79701 invoked by uid 500); 17 Jun 2016 06:03:05 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 79413 invoked by uid 99); 17 Jun 2016 06:03:05 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2016 06:03:05 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 404A12C1F62 for ; Fri, 17 Jun 2016 06:03:05 +0000 (UTC) Date: Fri, 17 Jun 2016 06:03:05 +0000 (UTC) From: "Akira AJISAKA (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-13192) org.apache.hadoop.util.LineReader match recordDelimiter has a bug MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 17 Jun 2016 06:03:07 -0000 [ https://issues.apache.org/jira/browse/HADOOP-13192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15335478#comment-15335478 ] Akira AJISAKA commented on HADOOP-13192: ---------------------------------------- Thanks [~zhudebin] for attaching the patches in the jira, but actually we don't need to attach the patches when there is a corresponding GitHub pull request because the Jenkins precommit job runs on the pull request. However, we need to hit "Submit Patch" to change the status to "Patch Available" to run the precommit job. > 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-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org