[
https://issues.apache.org/jira/browse/AVRO-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16977012#comment-16977012
]
ASF subversion and git services commented on AVRO-2618:
-------------------------------------------------------
Commit 9e5289b9fe7f66a0ed3481dc08c8f5933c1684db in avro's branch
refs/heads/branch-1.9 from Sébastien Foutrier
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=9e5289b ]
AVRO-2618: Support non-seekable Streams in DataFileReader (#702)
This commit allows to support non-seekable Stream as reading input in
avro DataFileReader. This allow not to force the user to fully download
a file from a network storage prior to read it.
When creating an DataFileReader with a non-seekable Stream, features as
Seek(), Sync(), PastSync(), PreviousSync() and Tell() can't be used.
(cherry picked commit from 3c10c361a788add7d7f27fb6102148d6106f2544)
> 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
> 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)