[ 
https://issues.apache.org/jira/browse/AVRO-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14731186#comment-14731186
 ] 

Ryan Blue commented on AVRO-1726:
---------------------------------

I don't think there is much use for this method if you don't add a way to start 
at a certain block or position offset. Otherwise you end up with a method that 
adds the first few blocks to another file. It is also much easier to do this 
based on position rather than number of blocks. Position allows you to seek, 
find the next sync, and then start processing blocks. You can also return the 
current position pretty easily for repeated calls to split a file.

This would then give you a reliable output size rather than some number of 
blocks, which can vary in size depending on the original writer's block size, 
compression, and recompression.

> Add support for appending a variable number of blocks to DataFileWriter
> -----------------------------------------------------------------------
>
>                 Key: AVRO-1726
>                 URL: https://issues.apache.org/jira/browse/AVRO-1726
>             Project: Avro
>          Issue Type: Improvement
>    Affects Versions: 1.7.7
>            Reporter: Bryan Bende
>            Priority: Minor
>             Fix For: 1.7.8, 1.8.0
>
>         Attachments: AVRO-1726.patch
>
>
> It would be helpful to have the ability to append a variable number of raw 
> blocks from a DataFileReader to a DataFileWriter, similar to appendAllFrom() 
> but specifying how many blocks to append.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to