avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tycho Lamerigts (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AVRO-1638) SpecificDatumReader cannot read inner classes
Date Tue, 10 Feb 2015 18:59:13 GMT
Tycho Lamerigts created AVRO-1638:
-------------------------------------

             Summary: SpecificDatumReader cannot read inner classes
                 Key: AVRO-1638
                 URL: https://issues.apache.org/jira/browse/AVRO-1638
             Project: Avro
          Issue Type: Bug
          Components: java
    Affects Versions: 1.7.7
            Reporter: Tycho Lamerigts


After generating Specific classes from the attached avro file's schema, the file's content
cannot be read by the following code.

{code}
DatumReader<Foo> r = new SpecificDatumReader<>(Foo.class);
DataFileReader<Foo> fr = new DataFileReader<>(new File("foo.avro"), r);
fr.next(); // this will throw
{code}

It appears to me that the logic in SpecificData#getClassName for dealing with names ending
with '$' is incorrect, which causes avro to fall back to GenericDatumReader and ultimately
fail.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message