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

Harsh J commented on HADOOP-11512:
----------------------------------

Thanks [~Ryan P] for working on this! Can you address the changes for the test 
as below?

1. The Configuration should be set to a specific class value, like say the 
WritableSerialization one, but with a prefixed or suffixed space.
2. The SerializationFactory(conf) initialization is graceful, i.e. it will not 
fail but just log a WARN. So the ideal test case would need to then use the 
factory to fetch the serializer for a class such as the Text or LongWritable 
class, and ensure the return is not null.

> Use getTrimmedStrings when reading serialization keys
> -----------------------------------------------------
>
>                 Key: HADOOP-11512
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11512
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 2.6.0
>            Reporter: Harsh J
>            Assignee: Ryan P
>            Priority: Minor
>         Attachments: HADOOP-11512.patch
>
>
> In the file 
> {{hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/serializer/SerializationFactory.java}},
>  we grab the IO_SERIALIZATIONS_KEY config as Configuration#getStrings(…) 
> which does not trim the input. This could cause confusing user issues if 
> someone manually overrides the key in the XML files/Configuration object 
> without using the dynamic approach.
> The call should instead use Configuration#getTrimmedStrings(…), so the 
> whitespace is trimmed before the class names are searched on the classpath.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to