Return-Path: Delivered-To: apmail-avro-dev-archive@www.apache.org Received: (qmail 32771 invoked from network); 25 Feb 2011 20:35:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Feb 2011 20:35:45 -0000 Received: (qmail 79316 invoked by uid 500); 25 Feb 2011 20:35:45 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 79228 invoked by uid 500); 25 Feb 2011 20:35:45 -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 79054 invoked by uid 99); 25 Feb 2011 20:35:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 20:35:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 20:35:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 257AF1AD856 for ; Fri, 25 Feb 2011 20:35:22 +0000 (UTC) Date: Fri, 25 Feb 2011 20:35:22 +0000 (UTC) From: "Scott Carey (JIRA)" To: dev@avro.apache.org Message-ID: <1481483535.541.1298666122150.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <108614126.1793.1297914864384.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Updated: (AVRO-769) Java: Align Decoder/Encoder APIs for consistency and long term stability 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-769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Scott Carey updated AVRO-769: ----------------------------- Attachment: AVRO-769.v2.patch I'm out of time and will not be able to work on this again until Monday. The patch here is where I am at, it fixes the Javadoc errors and looks good but I have not had a chance to go through it in detail. > Java: Align Decoder/Encoder APIs for consistency and long term stability > ------------------------------------------------------------------------- > > Key: AVRO-769 > URL: https://issues.apache.org/jira/browse/AVRO-769 > Project: Avro > Issue Type: Improvement > Components: java > Reporter: Scott Carey > Assignee: Scott Carey > Priority: Blocker > Fix For: 1.5.0 > > Attachments: AVRO-769.v1.patch, AVRO-769.v2.patch > > > As part of AVRO-753, we modified the Encoder API to be more like the current Decoder API. This issue tracks related changes to solidify the API of both Encoder and Decoder to be more stable and consistent. It is expected that the result will be long-lived and not require major changes in the future for the following reasons: > * Instantiation and configuration will be funneled through EncoderFactory and DecoderFactory. Individual implementation types and constructors are not exposed. With this abstraction we could, for example, put the features of BlockingBinaryEncoder into BufferedBinaryEncoder and not break any user code. We already have some of this distinction on the Decoder side, but not all BinaryDecoders are going through the factory. > * The core Encoder and Decoder abstract classes will not declare configuration methods or constructors. This makes them 'pure' low level Avro read/write API constructs. This separation of concerns means, for example, that not all encoder implementations need wrap an OutputStream because of init(OutputStream out). > * The core Encoder and Decoder API does not know or care about Schemas, resolution, or any other 'higher order' Avro concept. This is the pure separation of concern for writing/reading primitive Avro types to/from somewhere. > * Implementations have been heavily performance tuned on both sides, so changes to the API necessary for high performance will not be likely. > The Factories will adhere to the following general principles: > * configuration options that do not affect the semantics of a type can be set through the factory. i.e. buffer sizes. > * configuration that affects the semantics or changes the output or supported input will have separate factory methods. For example, choosing between an implementation that requires calling flush() and one that does not, requires choosing a different factory method to instantiate. This is important because it generally means that client code explicitly requests the behavioral type, and that helps prevent bugs caused by accidentally configuring a factory to return an object that is incompatible with the use case. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira