[
https://issues.apache.org/jira/browse/HADOOP-8588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461324#comment-13461324
]
Harsh J commented on HADOOP-8588:
---------------------------------
Sorry for the late review Sho, I'd been busy. Some comments:
{code}
+ if (conf.get(CommonConfigurationKeys.IO_SERIALIZATIONS_KEY) == "") {
{code}
The double equal-to seems wrong to compare strings? Can we use .isEmpty() or
.equals() instead? May also be worth having a Configuration method that checks
for existence and for emptiness rather than us always comparing if it has one
manually like this all the time (but this is just a nit, lets do it in another
JIRA if agreed, that doesn't depend on the patch here).
{code}
+ public void testGetDesirializer() {
{code}
s/Desirializer/Deserializer
{code}
LOG.warn(CommonConfigurationKeys.IO_SERIALIZATIONS_KEY
+ + " is empty. start up without any valid serialization classes.");
{code}
Maybe this can be refined to: "Serialization for various data types may not be
available. Please configure X properly to have serialization support (it is
currently not set)."?
> SerializationFactory shouldn't throw a NullPointerException if the
> serializations list is empty
> -----------------------------------------------------------------------------------------------
>
> Key: HADOOP-8588
> URL: https://issues.apache.org/jira/browse/HADOOP-8588
> Project: Hadoop Common
> Issue Type: Improvement
> Components: io
> Affects Versions: 2.0.0-alpha
> Reporter: Harsh J
> Assignee: Sho Shimauchi
> Priority: Minor
> Attachments: HADOOP-8588.txt
>
>
> The SerializationFactory throws an NPE if
> CommonConfigurationKeys.IO_SERIALIZATIONS_KEY is set to an empty list in the
> config.
> It should rather print a WARN log indicating the serializations list is
> empty, and start up without any valid serialization classes.
--
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