You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2011/02/04 20:06:30 UTC
[jira] Commented: (AVRO-757) Allow a DataFile to be reopened
without reading the head
[ https://issues.apache.org/jira/browse/AVRO-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990680#comment-12990680 ]
Doug Cutting commented on AVRO-757:
-----------------------------------
This sounds reasonable.
The specification includes a schema that corresponds to the file header.
http://avro.apache.org/docs/current/spec.html#Object+Container+Files
Perhaps we should implement this by adding the following methods to DataFileReader:
- public Header getHeader();
- public static FileReader<D> openReader(SeekableInput in, DatumReader<D>, Header);
The openReader() implementation should probably call sync(in.tell()), although there might be cases where you want it to instead just call seek(in.tell()). Perhaps there should be a boolean 'sync' parameter to that method that defaults to true?
> Allow a DataFile to be reopened without reading the head
> --------------------------------------------------------
>
> Key: AVRO-757
> URL: https://issues.apache.org/jira/browse/AVRO-757
> Project: Avro
> Issue Type: New Feature
> Components: java
> Reporter: Stu Hood
> Assignee: Stu Hood
> Labels: file
> Fix For: 1.5.0
>
>
> It is useful to be able to re-open a file without needing to seek to the head of the stream to collect metadata and schema that you've read before.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira