Avro C++
|
An Avro datafile that can store objects of type T. More...
#include <DataFile.hh>
Public Member Functions | |
DataFileWriter (const char *filename, const ValidSchema &schema, size_t syncInterval=16 *1024, Codec codec=NULL_CODEC) | |
Constructs a new data file. | |
DataFileWriter (std::unique_ptr< OutputStream > outputStream, const ValidSchema &schema, size_t syncInterval=16 *1024, Codec codec=NULL_CODEC) | |
void | write (const T &datum) |
Writes the given piece of data into the file. | |
uint64_t | getCurrentBlockStart () |
Returns the byte offset (within the current file) of the start of the current block being written. | |
void | close () |
Closes the current file. More... | |
const ValidSchema & | schema () const |
Returns the schema for this data file. | |
void | flush () |
Flushes any unwritten data into the file. | |
An Avro datafile that can store objects of type T.
|
inline |
Closes the current file.
Once closed this datafile object cannot be used for writing any more.