Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro, mail # user - Unable to compile a namespace-less schema


+
Vitaly Gordon 2013-10-07, 17:26
+
Sean Busbey 2013-10-07, 17:58
+
Vitaly Gordon 2013-10-07, 21:04
+
Vitaly Gordon 2013-10-09, 23:56
Copy link to this message
-
Re: Unable to compile a namespace-less schema
Doug Cutting 2013-10-10, 01:07
Using the current trunk of Avro I am able to:
 - extract the schema from the data file you provided (using
avro-tools schema command)
 - generate Java classes for this schema (using the avro-tools compile command)
 - compile these generated Java classes (using the javac command)

Can you provide a complete case of what fails for you?

Thanks,

Doug

On Wed, Oct 9, 2013 at 4:56 PM, Vitaly Gordon <[EMAIL PROTECTED]> wrote:
> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]> 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
>>
>>
>
+
Vitaly Gordon 2013-10-10, 06:21
+
Doug Cutting 2013-10-10, 20:58
+
Vitaly Gordon 2013-10-11, 20:59
+
Sean Busbey 2013-10-11, 21:15
+
Vitaly Gordon 2013-10-11, 21:21
+
Doug Cutting 2013-10-11, 21:43
+
Vitaly Gordon 2013-10-11, 23:40