Hi John,

Would you please provide more details about your use cases?

My first guess is: you want to incrementally append to a file?

If yes, I suggest:

- To write data: just use normal file I/O, append your data at the end of the 
DATA file. You should write the offset & length into an INDEX file
- To read data: read the INDEX file, seek to the offsets and read from the DATA 
file

Hope this help

On 2020/03/18 05:19:54, JohnGa <[email protected]> wrote: 
> Hello,
> When I create a new instance of avro::DataFileWriter on a filename, it
> always resets the file.  I modified the avro::DataFileWriter instantiation
> code to open the file in append mode if the file exists, and also skip
> writing the header.  Then I call the write method on the DataFileWriter. 
> However, I am unable to read this file.  It raises an exception about the
> magic being invalid.  
> 
> Can someone please give me a hint on how to modify the C++ avro, to be able
> to append data to an existing.
> 
> Thanls.
> 
> 
> 
> --
> Sent from: http://apache-avro.679487.n3.nabble.com/Avro-Users-f679479.html
> 

Reply via email to