You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Ujjwal Wadhawan <uw...@gmail.com> on 2014/08/26 22:40:08 UTC

AvroRuntimeException: Invalid sync! on windows

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