avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ries <mich...@riesd.com>
Subject Re: Rubygem Avro::DataFile issue?
Date Thu, 24 Apr 2014 15:15:09 GMT
Martin -
I'll definitely file the bug and I will hopefully have some time at work to
get a patch put together. I don't know anything about the binary format,
but hopefully I can spot the differences via a hexdump and that will get me
on the right track. Thanks for checking it out.
~Michael Ries

On Thu, Apr 24, 2014 at 2:32 AM, Martin Kleppmann

>  Hi Michael,
>  Thanks for reporting this. Your sample code seems to work correctly on
> Ruby 1.9.3, but fails on Ruby 2.*. The data file that it's writing is
> corrupted (the Java implementation of Avro can't read it either). So that
> looks like a bug in Avro when writing data files on Ruby >=2.0.
>  I just ran Avro's test suite on Ruby 2.0 and several tests failed. It
> looks like you're the first person to run it on 2.0. Sorry about that!
>  Would you mind filing a bug report at
> https://issues.apache.org/jira/browse/AVRO/ and attaching your example
> from the gist? If you feel like submitting a patch, we'd appreciate it. If
> not, I'll try to look into it soon.
>  Martin
>  On 23 Apr 2014, at 16:28, Michael Ries <michael@riesd.com> wrote:
> Hey. I'm trying to use the avro 1.7.5 gem (avoiding the 1.7.6 dependency
> bug) and I can't seem to read data back out of my data files. I am getting
> the error "avro-1.7.5/lib/avro/io.rb:46:in `byte!': undefined method
> `unpack' for nil:NilClass (NoMethodError)".
>  I put a more complete write up of what I am trying to do in this gist:
> https://gist.github.com/hqmq/11193064
>  Any idea what I'm doing wrong? It seems to be always failing while
> trying to decode the last record in the file. I get no luck on ruby 2.1.1
> or 2.0.0.
>  I tried creating an avro file using the java client library
> (members.from_java_client.avro) and the rubygem can read that file just
> fine. It looks like the two files are different by just 16 bytes.

View raw message