[
https://issues.apache.org/jira/browse/HADOOP-8619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425289#comment-13425289
]
Brandon Li commented on HADOOP-8619:
------------------------------------
Hi Radim,
Semantically, the patch is a good patch. It's not necessary to patch it for the
following reason:
{quote}...all referenced objects must be deserializable, otherwise there is no
way to reconstruct object tree back...{quote}
We are aware of that. One of the reasons that Interface "Writeable" was used
from the early days is it's simple/lightweight. If you are interested in how
it's used, you can take a look of some examples, such as
org.apache.hadoop.io.WritableComparable and the classes implementing it.
Usually it may not be needed to make an interface/class be able to support
several serialization approaches when one of them is sufficient for the usage.
:-)
Additionally, leaving it not patched can prevent developers form using Java
Serialization in Hadoop by mistake. With that said, we can always come back
apply this patch when we see Java Serialization is a must in the future. Agree?
:-)
> WritableComparator must implement no-arg constructor
> ----------------------------------------------------
>
> Key: HADOOP-8619
> URL: https://issues.apache.org/jira/browse/HADOOP-8619
> Project: Hadoop Common
> Issue Type: Improvement
> Components: io
> Affects Versions: 3.0.0
> Reporter: Radim Kolar
> Fix For: 0.23.0, 2.0.0-alpha, 3.0.0
>
> Attachments: writable-comparator.txt
>
>
> Because of reasons listed here:
> http://findbugs.sourceforge.net/bugDescriptions.html#SE_COMPARATOR_SHOULD_BE_SERIALIZABLE
> comparators should be serializable. To make deserialization work, it is
> required that all superclasses have no-arg constructor.
> http://findbugs.sourceforge.net/bugDescriptions.html#SE_NO_SUITABLE_CONSTRUCTOR
> Simply add no=arg constructor to WritableComparator.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira