| |
- __builtin__.object
-
- DataFileReader
- DataFileWriter
- DatumReaderBase
- DatumWriterBase
- Decoder
- Encoder
- avro.schema.AvroException(exceptions.Exception)
-
- AvroTypeException
class DataFileReader(__builtin__.object) |
|
Read files written by DataFileWriter. |
|
Methods defined here:
- __init__(self, reader, dreader)
- close(self)
- Close this reader.
- getmeta(self, key)
- Return the value of a metadata property.
- next(self)
- Return the next datum in the file.
- seek(self, pos)
- Move to the specified synchronization point, as returned by
DataFileWriter.sync().
- sync(self, position)
- Move to the next synchronization point after a position.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class DataFileWriter(__builtin__.object) |
|
Stores in a file a sequence of data conforming to a schema. The schema is
stored in the file with the data. Each datum in a file is of the same
schema. Data is grouped into blocks.
A synchronization marker is written between blocks, so that
files may be split. Blocks may be compressed. Extensible metadata is
stored at the end of the file. Files may be appended to. |
|
Methods defined here:
- __init__(self, schm, writer, dwriter)
- append(self, datum)
- Append a datum to the file.
- close(self)
- Close the file.
- flush(self)
- Flush the current state of the file, including metadata.
- setmeta(self, key, val)
- Set a meta data property.
- sync(self)
- Return the current position as a value that may be passed to
DataFileReader.seek(long). Forces the end of the current block,
emitting a synchronization marker.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class DatumReaderBase(__builtin__.object) |
|
Base class for reading data of a schema. |
|
Methods defined here:
- read(self, decoder)
- Read a datum. Traverse the schema, depth-first, reading all leaf values
in the schema into a datum that is returned
- setschema(self, schema)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class DatumWriterBase(__builtin__.object) |
|
Base class for writing data of a schema. |
|
Methods defined here:
- setschema(self, schema)
- write(self, data, encoder)
- Write a datum. Traverse the schema, depth first, writing each leaf value
in the schema from the datum to the output.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
|