[
https://issues.apache.org/jira/browse/AVRO-1316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13651921#comment-13651921
]
Micah Huff commented on AVRO-1316:
----------------------------------
[~cutting]--I'm not positive this is actually an issue with this code change.
We are still looking into it but it appears it could be an issue with how our
hadoop environment is configured and that it is not pulling in avro
1.7.5-SNAPSHOT for our files with the very large schemas but rather an old
version which then results in the 'NoSuchMethodException' being thrown.
I tried to repro this using a simple test case as described here and everything
worked. I generated a protocol definition that was beyond the 1K scope. I
compiled the protocol using 1.7.4 Avro. Once I had my protocol, I generated a
file using Avro 1.7.4 of data types from that sample protocol. I then swapped
out 1.7.4 Avro in favor of 1.7.5-SNAPSHOT and tried to read in that file I had
just generated. I was able to read everything out just fine.
We plan on continuing to march through this today and will hopefully have more
information soon.
Thanks.
> IDL code-generation generates too-long literals for very large schemas
> ----------------------------------------------------------------------
>
> Key: AVRO-1316
> URL: https://issues.apache.org/jira/browse/AVRO-1316
> Project: Avro
> Issue Type: Bug
> Components: java
> Reporter: Jeremy Kahn
> Assignee: Jeremy Kahn
> Priority: Minor
> Labels: patch
> Fix For: 1.7.5
>
> Attachments: AVRO-1316.patch, AVRO-1316.patch, AVRO-1316.patch,
> AVRO-1316.patch, AVRO-1316.patch, AVRO-1316.patch, AVRO-1316.patch
>
>
> When I work from a very large IDL schema, the Java code generated includes a
> schema JSON literal that exceeds the length of the maximum allowed literal
> string ([65535
> characters|http://stackoverflow.com/questions/8323082/size-of-initialisation-string-in-java]).
>
> This creates weird Maven errors like: {{[ERROR] ...FooProtocol.java:[13,89]
> constant string too long}}.
> It might seem a little crazy, but a 64-kilobyte JSON protocol isn't
> outrageous at all for some of the more involved data structures, especially
> if we're including documentation strings etc.
> I believe the fix should be a bit more sensitivity to the length of the JSON
> literal (and a willingness to split it into more than one literal, joined by
> {{+}}), but I haven't figured out where that change needs to go. Has anyone
> else encountered this problem?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira