Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 74647 invoked from network); 14 Mar 2009 00:39:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2009 00:39:16 -0000 Received: (qmail 27397 invoked by uid 500); 14 Mar 2009 00:39:13 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 27362 invoked by uid 500); 14 Mar 2009 00:39:13 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 27351 invoked by uid 99); 14 Mar 2009 00:39:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 17:39:13 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Mar 2009 00:39:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8300A234C045 for ; Fri, 13 Mar 2009 17:38:50 -0700 (PDT) Message-ID: <821121899.1236991130535.JavaMail.jira@brutus> Date: Fri, 13 Mar 2009 17:38:50 -0700 (PDT) From: "Chris Douglas (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-5307) Fix null value handling in StringUtils#arrayToString() and #getStrings() In-Reply-To: <135672989.1235405042524.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-5307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681959#action_12681959 ] Chris Douglas commented on HADOOP-5307: --------------------------------------- bq. Of course the patch is technically backwards-incompatible, what I say is that, the frequency is expected to be so small that it is negligible. Neither of us has enough data to assert anything about the frequency of any case because it's a public class. While my intuition matches yours, "incompatible change" isn't a statistical definition, let alone one based on our expectations. bq. passing an array, possibly containing null values seems to me generic enough to be introduced in StringUtils rather than a custom solution in the context(DBOutputFormat). I disagree. By supporting an escape for null references, this is defining a serialization for arrays of String, rather than representing an array of String in a single String. For this, the Stringifier seems like a more appropriate choice than changing the semantics of a method on StringUtils. bq. The API indicates to use the supplied column names, when in fact it did not, so 4955 is a bug fix, fixing the expected behavior from the API, rather than an improvement, introducing a new API. I see. From the description, it sounded like this was adding functionality by using the fields provided. I don't think adding a new API is necessary to differentiate an improvement from a bug; it's sufficient to change functionality. If the intent was to use them, then OK. bq. What would you suggest? Not sure. Since this seems to be serializing an array in and out of configs, I'm leaning towards the Stringifier work as a solution local to DBConfiguration. Would that work? > Fix null value handling in StringUtils#arrayToString() and #getStrings() > ------------------------------------------------------------------------ > > Key: HADOOP-5307 > URL: https://issues.apache.org/jira/browse/HADOOP-5307 > Project: Hadoop Core > Issue Type: Bug > Components: util > Affects Versions: 0.21.0 > Reporter: Enis Soztutar > Assignee: Enis Soztutar > Attachments: h5307_v1.patch > > > StringUtils#arrayToString() converts String array to a String of comma separated elements. If the String array includes null values, these are recovered as "null" (literal) from getStrings() method, which eventually causes configuration issues. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.