You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Hemant Patre <he...@gmail.com> on 2015/01/22 12:20:05 UTC

Avro file compressed with snappy in jruby not able to get read in Java

For my project task, I need to read and write avro files in jruby as well
as in Java. Without compression, I am able to read avro files by both
readers (ruby and java) written any of the two writers.
But when write the avro file with snappy compression in jruby, I can read
it in jruby but not able to read it in Java and vice versa. I am getting
following exception

java.io.IOException: FAILED_TO_UNCOMPRESS(5)
    at org.xerial.snappy.SnappyNative.throw_error(SnappyNative.java:84)
    at org.xerial.snappy.SnappyNative.rawUncompress(Native Method)
    at org.xerial.snappy.Snappy.rawUncompress(Snappy.java:444)
    at org.xerial.snappy.Snappy.uncompress(Snappy.java:480)
    at org.apache.avro.file.SnappyCodec.decompress(SnappyCodec.java:60)....

I am using following versions:
For jruby:
jruby-1.7.18
avro-1.7.7
snappy-0.0.11-java
snappy-jars-1.1.0.1.2-java
For java:
java 1.7.0_19
snappy-1.0.5 (tried with 1.1.0.1, 1.1.1.6 also)
avro-1.7.7

Thanks,
Hemant