[ https://issues.apache.org/jira/browse/AVRO-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16977030#comment-16977030 ]
Hudson commented on AVRO-2618: ------------------------------ SUCCESS: Integrated in Jenkins build AvroJava #773 (See [https://builds.apache.org/job/AvroJava/773/]) AVRO-2618: Support non-seekable Streams in DataFileReader (#702) (blachniet: [https://github.com/apache/avro/commit/3c10c361a788add7d7f27fb6102148d6106f2544]) * (edit) lang/csharp/src/apache/main/File/DataFileWriter.cs * (edit) lang/csharp/src/apache/main/File/DataFileReader.cs * (edit) lang/csharp/src/apache/test/File/FileTests.cs > C# DataFileReader requires Stream to be Seekable for no reason > -------------------------------------------------------------- > > Key: AVRO-2618 > URL: https://issues.apache.org/jira/browse/AVRO-2618 > Project: Apache Avro > Issue Type: Bug > Components: csharp > Reporter: Sébastien Foutrier > Priority: Major > Fix For: 1.10.0, 1.9.2 > > Original Estimate: 4h > Remaining Estimate: 4h > > When calling the method DataFileReader.OpenReader on a non-seekable stream, > the method throws an AvroException. > The requirements for this Seek() call is: > # To ensure the magic number to be there and rewind the Stream afterward. > # To be able to call the methods Seek and Sync. > The 1. is not useful as the Ctor does ensure again that the magic number is > there (this is the reason why the Stream has to be rewind). This code can > just be removed with no side effect, as a Stream without this magic number > will throw itself an AvroException. (the message being "Not a valid data > file!" instead of "Not an Avro data file"). > The 2. could be checked at the call time of the method: the user that sends a > non-seekable Stream should not call Seek or Sync upon the reader. (and by the > way the Stream should throws a UnsupportedException at this time) -- This message was sent by Atlassian Jira (v8.3.4#803005)