Return-Path: X-Original-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D6AF9FAAB for ; Mon, 1 Apr 2013 04:13:18 +0000 (UTC) Received: (qmail 14820 invoked by uid 500); 1 Apr 2013 04:13:18 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 14267 invoked by uid 500); 1 Apr 2013 04:13:17 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 13185 invoked by uid 99); 1 Apr 2013 04:13:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Apr 2013 04:13:16 +0000 Date: Mon, 1 Apr 2013 04:13:15 +0000 (UTC) From: "Kai Wei (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (MAPREDUCE-5121) Problem with field separator in FieldSelectionHelper MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MAPREDUCE-5121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kai Wei updated MAPREDUCE-5121: ------------------------------- Attachment: MAPREDUCE-5121.patch > Problem with field separator in FieldSelectionHelper > ---------------------------------------------------- > > Key: MAPREDUCE-5121 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-5121 > Project: Hadoop Map/Reduce > Issue Type: Bug > Affects Versions: 1.0.4 > Reporter: Kai Wei > Assignee: Kai Wei > Priority: Trivial > Attachments: MAPREDUCE-5121.patch > > > I found that org.apache.hadoop.mapreduce.lib.fieldsel.FieldSelectionHelper and the corresponding old api org.apache.hadoop.mapred.lib.FieldSelectionMapReduce take user specified separator string as a regular expression in String.split(), but also use it as a normal string in StringBuffer.append(). It will be a problem if the separator string contains meta character. I suggest take separator literally by calling Pattern.quote(separator). Or just use another property to specify the separator which should be added in the output. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira