hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Douglas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-5307) Fix null value handling in StringUtils#arrayToString() and #getStrings()
Date Sat, 14 Mar 2009 00:38:50 GMT

    [ 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.


Mime
View raw message