Return-Path: Delivered-To: apmail-hadoop-avro-dev-archive@minotaur.apache.org Received: (qmail 12383 invoked from network); 11 Nov 2009 04:47:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Nov 2009 04:47:45 -0000 Received: (qmail 11681 invoked by uid 500); 11 Nov 2009 04:47:45 -0000 Delivered-To: apmail-hadoop-avro-dev-archive@hadoop.apache.org Received: (qmail 11575 invoked by uid 500); 11 Nov 2009 04:47:43 -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 11564 invoked by uid 99); 11 Nov 2009 04:47:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 04:47:43 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of justin@fathomdb.com designates 209.85.222.195 as permitted sender) Received: from [209.85.222.195] (HELO mail-pz0-f195.google.com) (209.85.222.195) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 04:47:41 +0000 Received: by pzk33 with SMTP id 33so525318pzk.2 for ; Tue, 10 Nov 2009 20:47:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.143.27.40 with SMTP id e40mr112159wfj.230.1257914840718; Tue, 10 Nov 2009 20:47:20 -0800 (PST) Date: Tue, 10 Nov 2009 20:47:20 -0800 Message-ID: Subject: Why Paranamer? From: Justin Santa Barbara To: avro-dev@hadoop.apache.org Content-Type: multipart/alternative; boundary=00504502cbf43d1f4d0478111f6d --00504502cbf43d1f4d0478111f6d Content-Type: text/plain; charset=ISO-8859-1 Given some of the complexities involved in paranamer builds, I'm wondering why Avro doesn't use annotations instead. It seems that parameter names are only needed for Avro interfaces, and these are mostly generated from .avpr files (rather than being hand-written). I've done a quick implementation, and it seems to work well: http://github.com/justinsb/avro/commit/b5532e3bf8967a6e97c795a480f74731945849e5 The actual @Named annotation is here: http://github.com/justinsb/avro/blob/259047e9b51bdb690a8b2c0ce5693ba65ed94536/src/java/org/apache/avro/Named.java So an example generated interface looks like this, and there's no need to run Paranamer: @SuppressWarnings("all") public interface BulkData { ByteBuffer read() throws AvroRemoteException; Void write(@Named("data") ByteBuffer data) throws AvroRemoteException; } I'm guessing there's some historical reason here - can anyone fill me in on the reasoning? Justin --00504502cbf43d1f4d0478111f6d--