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

Tsuyoshi OZAWA commented on HADOOP-9869:
----------------------------------------

[~zjshen] and [~stev...@iseran.com], thank you for review. I've surveyed how 
these functions are used.

bq. 1. getEnum

Configuration#getEnum is used to set enumerated constants like 
CompressionLevel. I agree that its constants' name should not be stared with 
whitespace.

bq.  2. getPattern

Configuration#getPattern is used to set UNPACK_JAR_PATTERN. This configuration 
expresses directory, and the linux's directory can be started with 
whitespace(like " bar"). Therefore, IMHO, the configuration's value shouldn't 
be trimmed.  What do you think?

Anyway, we should describe whether whitespace are trimmed or not in javadocs.
                
>  Configuration.getSocketAddr() should use getTrimmed()
> ------------------------------------------------------
>
>                 Key: HADOOP-9869
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9869
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 3.0.0, 2.1.0-beta, 1.3.0
>            Reporter: Steve Loughran
>            Assignee: Tsuyoshi OZAWA
>            Priority: Minor
>         Attachments: HADOOP-9869.1.patch
>
>
> YARN-1059 has shown that the hostname:port string used for the address of 
> things like the RM isn't trimmed before its parsed, leading to errors that 
> aren't that obvious. 
> We should trim it -it's clearly not going to break any existing (valid) 
> configurations

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

Reply via email to