[
https://issues.apache.org/jira/browse/HADOOP-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642416#action_12642416
]
Chris Douglas commented on HADOOP-4212:
---------------------------------------
bq. The most of the use cases, except the filename's don't require a trailing
whitespace for instance HADOOP-4416, So shouldn't we just treat file paths as
special case and allow users to mention path which have trailing and leading
spaces in special way? That way we can make sure that the user intends to use
them instead of adding a space by accident?
I disagree. Configuration should assume the semantics of the value Strings are
known to the user defining the property. Where the user _instructs_ the
Configuration to interpret the value, the semantics are explicit and sanitizing
input is reasonable. In addition to resolving class names, it would be
reasonable to trim values interpreted in getInt, getLong, etc., though it would
still be an incompatible change (IIRC, the default value is returned for
invalid input). It's certainly an incompatible change in the general case. I
think we should close this issue as "Won't fix" and consider broadening the
scope of HADOOP-4416.
> New lines and leading spaces are not trimmed of a value when configuration is
> read
> ----------------------------------------------------------------------------------
>
> Key: HADOOP-4212
> URL: https://issues.apache.org/jira/browse/HADOOP-4212
> Project: Hadoop Core
> Issue Type: Bug
> Components: conf
> Affects Versions: 0.18.1
> Environment: Generic
> Reporter: Sreekanth Ramakrishnan
> Assignee: Sreekanth Ramakrishnan
> Priority: Minor
> Attachments: HADOOP-4212-1.patch, HADOOP-4212-TESTCASE.patch
>
>
> While configuration value is read the leading and trailing spaces and new
> line characters are taken into account.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.