Return-Path: X-Original-To: apmail-avro-user-archive@www.apache.org Delivered-To: apmail-avro-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DE67511673 for ; Sat, 21 Jun 2014 14:17:10 +0000 (UTC) Received: (qmail 25311 invoked by uid 500); 21 Jun 2014 14:17:10 -0000 Delivered-To: apmail-avro-user-archive@avro.apache.org Received: (qmail 25226 invoked by uid 500); 21 Jun 2014 14:17:10 -0000 Mailing-List: contact user-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@avro.apache.org Delivered-To: mailing list user@avro.apache.org Received: (qmail 25216 invoked by uid 99); 21 Jun 2014 14:17:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Jun 2014 14:17:10 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of joey@cloudera.com designates 209.85.128.170 as permitted sender) Received: from [209.85.128.170] (HELO mail-ve0-f170.google.com) (209.85.128.170) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Jun 2014 14:17:06 +0000 Received: by mail-ve0-f170.google.com with SMTP id i13so4604961veh.1 for ; Sat, 21 Jun 2014 07:16:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=MG7oUDuzMIn4T0Bm8RCJwuzg5gymkIZ5a4L3zyyNqic=; b=Wl4b8YvpqoF8gxfGw5mga14wskwRmd03G4xvBZBt5gLJkvJ+f7TaODZDFlQkBBtjXn OHTWnUpsJILcS6DuFohb5PexratzbFuMg2pQ3YlZJjgaCiEU0mnTzPvVYVPL0JXKIjBB lIztWMEI0MMuAk0V2srF0C4NODKk4qNN4SsteVmvSdLfO+HD+i8tT/vnS6uf296ReBFE VsnQ9y4gE3TA2GEdk1bOljJWz83xx/VQPAo8b9BYYQZyb+qwpwQ5Y79QhSADEtsU+T2Q /VJeDRZmLvq/oagkfB54NSwPqkgBtNdIGoC5l/c9pRmMthvNX5DzNG/0CW4W7eW5exnT 0WaA== X-Gm-Message-State: ALoCoQnLREBJItcQPfq8dWB5/p4NVsGB1PVI2cJUnO38hB6TtnapSw912d14Mb6EEQnuWlvJ0SJ1 MIME-Version: 1.0 X-Received: by 10.58.68.129 with SMTP id w1mr57098vet.49.1403360205260; Sat, 21 Jun 2014 07:16:45 -0700 (PDT) Received: by 10.58.118.135 with HTTP; Sat, 21 Jun 2014 07:16:45 -0700 (PDT) In-Reply-To: References: Date: Sat, 21 Jun 2014 10:16:45 -0400 Message-ID: Subject: Re: Passing Schema objects through Avro RPC From: Joey Echeverria To: user@avro.apache.org Content-Type: multipart/alternative; boundary=047d7b3390f386e07a04fc59420a X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3390f386e07a04fc59420a Content-Type: text/plain; charset=UTF-8 That would definitely help, I'll take a look at it! I worked around it for the moment by creating a CustomEncoding that encodes using Schema#toString() and decodes using Parser#parse(String). I then annotated my Schema field with @AvroEncode(using=SchemaAsStringEncoding.class). -Joey On Sat, Jun 21, 2014 at 9:57 AM, Harsh J wrote: > Hey Joey, > > Are you perhaps looking for https://issues.apache.org/jira/browse/AVRO-251 > ? > > On Sat, Jun 21, 2014 at 2:20 AM, Joey Echeverria > wrote: > > Has anyone built an Avro RPC interface that includes a method that > returns > > Avro Schema objects? > > > > I've built my protocol using the reflect APIs, but because Schema doesn't > > have an empty constructor, I get a NoSuchMethodException when trying to > > deserialize on the client. > > > > -Joey > > > > -- > Harsh J > -- Joey Echeverria --047d7b3390f386e07a04fc59420a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
That would definitely help, I'll take a look at it!
I worked around it for the moment by creating a CustomEnco= ding that encodes using Schema#toString() and decodes using Parser#parse(St= ring). I then annotated my Schema field with=C2=A0@AvroEncode(using=3DSchem= aAsStringEncoding.class).

-Joey


On Sat, Jun 21, 2014 at 9:57 AM, Harsh J <harsh@= cloudera.com> wrote:
Hey Joey,

Are you perhaps looking for https://issues.apache.org/jira/browse/AVRO-25= 1?

On Sat, Jun 21, 2014 at 2:20 AM, Joey Echeverria <joey@cloudera.com> wrote:
> Has anyone built an Avro RPC interface that includes a method that ret= urns
> Avro Schema objects?
>
> I've built my protocol using the reflect APIs, but because Schema = doesn't
> have an empty constructor, I get a NoSuchMethodException when trying t= o
> deserialize on the client.
>
> -Joey



--
Harsh J



--
Joey Echeverria
--047d7b3390f386e07a04fc59420a--