hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-6578) Configuration should trim whitespace around a lot of value types
Date Thu, 04 Mar 2010 23:31:27 GMT

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

Todd Lipcon commented on HADOOP-6578:
-------------------------------------

- In getTrimmed(String), why not have this function just wrap the existing get() and trim
the result, rather than duplicating its functionality?
- I'm not sure it makes sense to modify getClassByName. For external users calling this function
directly, I don't think we should trim for them. For internal users, you've already covered
those cases in .getClass() and .getClasses().
- Since it's easy to test, might as well throw a few more test cases in the existing TestConfiguration.



> Configuration should trim whitespace around a lot of value types
> ----------------------------------------------------------------
>
>                 Key: HADOOP-6578
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6578
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Michele (@pirroh) Catasta
>            Priority: Minor
>         Attachments: HADOOP-6578.patch
>
>
> I've seen multiple users make an error where they've listed some whitespace around a
class name (eg for configuring a scheduler). This results in a ClassNotFoundException which
is very hard to debug, as you don't notice the whitespace in the exception! We should simply
trim the whitespace in Configuration.getClass and Configuration.getClasses to avoid this class
of user error.
> Similarly, we should trim in getInt, getLong, etc - anywhere that whitespace doesn't
have semantic meaning we should be a little less strict on input.

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