Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 90E5BD7C6 for ; Mon, 30 Jul 2012 21:55:37 +0000 (UTC) Received: (qmail 59395 invoked by uid 500); 30 Jul 2012 21:55:36 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 59284 invoked by uid 500); 30 Jul 2012 21:55:36 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 58866 invoked by uid 99); 30 Jul 2012 21:55:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2012 21:55:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 5AC49142851 for ; Mon, 30 Jul 2012 21:55:35 +0000 (UTC) Date: Mon, 30 Jul 2012 21:55:35 +0000 (UTC) From: "Brandon Li (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <1038810506.118326.1343685335373.JavaMail.jiratomcat@issues-vm> In-Reply-To: <227476706.98145.1343162914526.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HADOOP-8619) WritableComparator must implement no-arg constructor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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