Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 23E4910DBF for ; Fri, 7 Mar 2014 23:05:54 +0000 (UTC) Received: (qmail 71469 invoked by uid 500); 7 Mar 2014 23:05:50 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 71402 invoked by uid 500); 7 Mar 2014 23:05:48 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 71336 invoked by uid 99); 7 Mar 2014 23:05:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Mar 2014 23:05:45 +0000 Date: Fri, 7 Mar 2014 23:05:45 +0000 (UTC) From: "Robert Chu (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AVRO-1476) Make position field of org.apache.avro.Schema not transient. 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/AVRO-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13924458#comment-13924458 ] Robert Chu commented on AVRO-1476: ---------------------------------- I would think you would want to serialize this field. Without serializing it, the position of each field in a record would be lost. Unless I'm misreading this, not having correct position information for a field in a record would cause all fields to be written to a single position. Since transient fields will get reset to their type's default value, to support regenerating this field post-serialization, either the marker value for "uninitialized value" should be changed to 0 (the default value for int) or the need to regenerate this cached variable should be indicated elsewhere. > Make position field of org.apache.avro.Schema not transient. > ------------------------------------------------------------ > > Key: AVRO-1476 > URL: https://issues.apache.org/jira/browse/AVRO-1476 > Project: Avro > Issue Type: Task > Components: java > Affects Versions: 1.8.0, 1.7.7 > Reporter: Robert Chu > Priority: Minor > Attachments: AVRO-1476.patch > > > Referring to: https://github.com/apache/avro/blob/trunk/lang/java/avro/src/main/java/org/apache/avro/Schema.java#L358 > [~kryzthov] did some research into possible causes/reasons for this field to be marked as transient but was unable to find any reason. The org.apache.avro.Schema class is not marked as serializable so this transient field serves no purpose. This transient field can cause odd behaviors with external serialization frameworks (and the built-in java serialization framework) when trying to serialize schemas. -- This message was sent by Atlassian JIRA (v6.2#6252)