You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Lars Francke (JIRA)" <ji...@apache.org> on 2014/10/14 15:53:33 UTC
[jira] [Commented] (AVRO-1302) Files written via Python and Avro
1.7.4 on Windows can't be read using Java program
[ https://issues.apache.org/jira/browse/AVRO-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14170939#comment-14170939 ]
Lars Francke commented on AVRO-1302:
------------------------------------
We are facing the same problem.
I tried to build an Avro file with just one block/record and checked the resulting file. The header looks correct and the sync marker exists at the end of the block/file as well so that is all correct. Some other internal boundary/length thing must be wrong. For us we were trying to write a byte array in Python and that'd cause the error. If we leave out the byte array everything works.
> Files written via Python and Avro 1.7.4 on Windows can't be read using Java program
> -----------------------------------------------------------------------------------
>
> Key: AVRO-1302
> URL: https://issues.apache.org/jira/browse/AVRO-1302
> Project: Avro
> Issue Type: Bug
> Components: python
> Affects Versions: 1.7.4
> Reporter: Christopher Conner
> Priority: Minor
>
> I'm not sure if this is a Python issue, Avro issue or Windows issue. However, if create an Avro file on Windows using Python 2.7.4 and Avro 1.7.4. Then try to read it with a java program, it fails with:
> Successfully opened the Python avro file now I'm going to attempt to read from it
> Exception in thread "main" org.apache.avro.AvroRuntimeException: java.io.IOException: Invalid sync!
> at org.apache.avro.file.DataFileStream.hasNext(DataFileStream.java:210)
> at JavaPythonAvroExample.main(JavaPythonAvroExample.java:27)
> Caused by: java.io.IOException: Invalid sync!
> at org.apache.avro.file.DataFileStream.nextRawBlock(DataFileStream.java:293)
> at org.apache.avro.file.DataFileStream.hasNext(DataFileStream.java:198)
> ... 1 more
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)