avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ujjwal Wadhawan <uwadha...@gmail.com>
Subject AvroRuntimeException: Invalid sync! on windows
Date Tue, 26 Aug 2014 20:40:08 GMT
Hi Users,

I am trying to debug a rather unusual bug where Avro tool fails to read a
simple file. I compiled Avro on Windows as explained in
README.maintaining_win32.txt. I am using this library with a program I have
attached to the mail.

When I execute the program it creates the output.avro file. Depending on
the inner loop, if its 5 times - the generated Avro file reading fails as
under

$ java -jar "D:\jobs_and_tasks\avro-tools.jar" tojson
"D:\jobs_and_tasks\simple_copy\output.avro"
Exception in thread "main" org.apache.avro.AvroRuntimeException:
java.io.IOException: Invalid sync!
        at
org.apache.avro.file.DataFileStream.hasNext(DataFileStream.java:210)
        at
org.apache.avro.tool.DataFileReadTool.run(DataFileReadTool.java:63)
        at org.apache.avro.tool.Main.run(Main.java:84)
        at org.apache.avro.tool.Main.main(Main.java:73)


If the loop is anything but 5, it works. for e.g: loop of 6

$ java -jar "D:\jobs_and_tasks\avro-tools.jar" tojson
"D:\jobs_and_tasks\simple_copy\output.avro"
{"field1":"a"}
{"field1":"a"}
{"field1":"a"}
{"field1":"a"}
{"field1":"a"}
{"field1":"a"}


Has anyone seen this error/behavior before ?

Best,
Ujjwal

Mime
View raw message