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 42A8010E61 for ; Wed, 9 Oct 2013 23:57:19 +0000 (UTC) Received: (qmail 61501 invoked by uid 500); 9 Oct 2013 23:57:19 -0000 Delivered-To: apmail-avro-user-archive@avro.apache.org Received: (qmail 61448 invoked by uid 500); 9 Oct 2013 23:57:18 -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 61440 invoked by uid 99); 9 Oct 2013 23:57:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Oct 2013 23:57:18 +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 vitalip@gmail.com designates 209.85.217.179 as permitted sender) Received: from [209.85.217.179] (HELO mail-lb0-f179.google.com) (209.85.217.179) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Oct 2013 23:57:14 +0000 Received: by mail-lb0-f179.google.com with SMTP id x18so1466242lbi.10 for ; Wed, 09 Oct 2013 16:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=fMQVTLIY2rBAasONDIyf0k3I1DiyeFVA5AwZSF499F8=; b=sLYYfaysmPh3z2Ved9L0rPVffwwavfMAYSnbNssDO0y5JGdUAf3F2CkxAZKJy8RpH2 vcEG1piMU6mvlNrM7mOJ2NX6Nx/V2Ssmz9sNbn6FeMFdpMyNWk9KNph3dya9UcmwLh00 VGC9LtdgjGI2ZiwmOFCytECkveHtANzI10QahQgzd4Mgsb2+4F9HHV4ypB6Msc1n41/1 MMhaK6BjEFq3Yi1A54k7CHuIis9X2oZD7hwgwWES6iyzWzBf/3Yg4XLnn6gBQrjO+QEd tAI6YmLkNdnatLt2TaJeim3tNVliD7vP0/zmuW/fg3hnR6ZxO+hzLIbF++aRZ8HD5q0E 4Cbw== MIME-Version: 1.0 X-Received: by 10.112.210.136 with SMTP id mu8mr9443609lbc.25.1381363013008; Wed, 09 Oct 2013 16:56:53 -0700 (PDT) Received: by 10.112.56.209 with HTTP; Wed, 9 Oct 2013 16:56:52 -0700 (PDT) In-Reply-To: References: Date: Wed, 9 Oct 2013 16:56:52 -0700 Message-ID: Subject: Re: Unable to compile a namespace-less schema From: Vitaly Gordon To: user Content-Type: multipart/alternative; boundary=001a11c3c704b241e804e857a30b X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3c704b241e804e857a30b Content-Type: text/plain; charset=ISO-8859-1 Does anyone else might have an idea how I can resolve this "namespace-less" Avro schema code generation? Thanks, Vitaly On Mon, Oct 7, 2013 at 2:04 PM, Vitaly Gordon wrote: > Hi Sean, > Here is a file that contains a single record that I cannot read using a > specific reader. > > It's hard for me to add code because the problem is a compilation problem > with the generated Java files. > > So to recreate the problem: > 1. Extract the schema from the record > 2. Generate the code from the schema > 3. Compile > > Is there another way that I can describe the issue? > > > > On Mon, Oct 7, 2013 at 10:58 AM, Sean Busbey wrote: > >> Hi Vitay! >> >> Can you give us a minimal schema and test program that illustrates the >> problem you're describing? >> >> -- >> Sean >> On Oct 7, 2013 12:27 PM, "Vitaly Gordon" wrote: >> >>> Hi All, >>> I am trying to read Avro data that its schema does not have a namespace. >>> The problem is that I cannot compile the classes, because the generated >>> Java code does not have a package. On the other hand, if I do add some >>> arbitrary namespace to the schema, the record is resolved as a generic one, >>> which then fails on ClassCastException to the specific record. >>> >>> Any ideas on how I can resolve this issue? >>> >>> Thanks, >>> Vitay >>> >> > --001a11c3c704b241e804e857a30b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Does anyone else might have an idea how I can resolve this= "namespace-less" Avro schema code generation?

Thanks,
Vitaly


On Mon, Oct 7, 2013 at 2:04 PM, Vitaly Gordon <vitalip@gmail.com> wrote:
Hi Sean,
Here is a file that contains a single record = that I cannot read using a specific reader.

It'= ;s hard for me to add code because the problem is a compilation problem wit= h the generated Java files.

So to recreate the problem:
1. Extract the sc= hema from the record
2. Generate the code from the schema
3. Compile

Is there another way that I can describe the issue?


<= br>
On Mon, Oct 7, 2013 at 10:58 AM, Sean Busbey = <busbey@cloudera.com> wrote:

Hi Vitay!

Can you give us a minimal schema and test program that illus= trates the problem you're describing?

--
Sean

On Oct 7, 2013 12:27 PM, "Vitaly Gordon&quo= t; <vitalip@gmail= .com> wrote:
Hi All,
I am trying to read Avro data that its schema = does not have a namespace. The problem is that I cannot compile the classes= , because the generated Java code does not have a package. On the other han= d, if I do add some arbitrary namespace to the schema, the record is resolv= ed as a generic one, which then fails on ClassCastException to the specific= record.

Any ideas on how I can resolve this issue?
Thanks,
Vitay


--001a11c3c704b241e804e857a30b--