hadoop-common-dev mailing list archives

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

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

Enis Soztutar commented on HADOOP-5307:
---------------------------------------

The issue occurs in the context of storing/restoring an array(with possible null values) in
the configuration. The specific use case arose after HADOOP-4955, in which we store the column
names in the configuration for DB access, however the names of the columns are not always
available to the job, thus are passed as null array. 

This issue fixes the issue introduced by HADOOP-4955(which wad committed to 0.19), I guess
it is appropriate for this to be in 0.19. 

As for escaping literal instances of "__null__", we can introduce an escaping mechanism, however
it will not be backwards compatible, since "any" form of escaping the value will result in
some literal matching the value which was not set by StringUtils#arrayToStrings(). (For example
setting the value by hand from the configuration). 

I believe that using a pragmatical value for representing nulls, which is extremely unlikely
to occur, does not introduce a backward incompatibility at all. I think classifying this as
an incompatible change would only introduce noise to the long list of incompatible changes.




> 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