Return-Path: Delivered-To: apmail-hadoop-avro-dev-archive@minotaur.apache.org Received: (qmail 65713 invoked from network); 1 Feb 2010 18:54:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Feb 2010 18:54:42 -0000 Received: (qmail 52130 invoked by uid 500); 1 Feb 2010 18:54:41 -0000 Delivered-To: apmail-hadoop-avro-dev-archive@hadoop.apache.org Received: (qmail 52091 invoked by uid 500); 1 Feb 2010 18:54:41 -0000 Mailing-List: contact avro-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: avro-dev@hadoop.apache.org Delivered-To: mailing list avro-dev@hadoop.apache.org Received: (qmail 52081 invoked by uid 99); 1 Feb 2010 18:54:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2010 18:54:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2010 18:54:39 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B98B829A0011 for ; Mon, 1 Feb 2010 10:54:18 -0800 (PST) Message-ID: <1977569059.2601265050458716.JavaMail.jira@brutus.apache.org> Date: Mon, 1 Feb 2010 18:54:18 +0000 (UTC) From: "Scott Carey (JIRA)" To: avro-dev@hadoop.apache.org Subject: [jira] Commented: (AVRO-261) Allow Schemas to be immutable In-Reply-To: <26548362.1261162881296.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AVRO-261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828220#action_12828220 ] Scott Carey commented on AVRO-261: ---------------------------------- bq. Thiru: does wrapping these not affect performance? Many operations iterate over fields or lookup enum symbols. The immutable wrapper adds another method call to each such operation. Generally, if the wrapper is very simple then the JIT is good at in-lining these making the wrapper 'free'. So if its just wrapping the List api, delegating read methods and blocking write methods it usually will be fine other than the extra object allocation for the wrapper, which is less important. Inlining can get tripped up in a few cases -- Interfaces are much harder to inline, and polymorphic methods with more than two variations detected at runtime are not inlined, so don't get fancy. Either way, this should be easy to test. > Allow Schemas to be immutable > ----------------------------- > > Key: AVRO-261 > URL: https://issues.apache.org/jira/browse/AVRO-261 > Project: Avro > Issue Type: New Feature > Components: java > Reporter: Kevin Oliver > Assignee: Thiruvalluvan M. G. > Priority: Minor > Attachments: AVRO-261.patch > > > It would be nice if there was the ability to have an immutable Schema in java. > Without this, it makes sharing schemas risky. Also, with this, we could (lazily) cache the hashCode which is a fairly expensive operation today, especially on something like a record. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.