avro.io
index
/home/cutting/src/avro/test/src/py/avro/io.py

Input/Output utilities.

 
Modules
       
cStringIO
avro.schema
struct
uuid

 
Classes
       
__builtin__.object
DataFileReader
DataFileWriter
DatumReaderBase
DatumWriterBase
Decoder
Encoder
avro.schema.AvroException(exceptions.Exception)
AvroTypeException

 
class AvroTypeException(avro.schema.AvroException)
    Raised when illegal type is used.
 
 
Method resolution order:
AvroTypeException
avro.schema.AvroException
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods defined here:
__init__(self, schm=None, datum=None, msg=None)

Data descriptors inherited from avro.schema.AvroException:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object at 0x8226dc0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
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)

 
class Decoder(__builtin__.object)
    Read leaf values.
 
  Methods defined here:
__init__(self, reader)
read(self, len)
readboolean(self)
readbytes(self)
readdouble(self)
readfloat(self)
readint(self)
readlong(self)
readutf8(self)
skip(self, len)
skipboolean(self)
skipbytes(self)
skipdouble(self)
skipfloat(self)
skipint(self)
skiplong(self)
skiputf8(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class Encoder(__builtin__.object)
    Write leaf values.
 
  Methods defined here:
__init__(self, writer)
write(self, datum)
writeboolean(self, datum)
writebytes(self, datum)
writedouble(self, datum)
writefloat(self, datum)
writeint(self, n)
writelong(self, n)
writeutf8(self, datum)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)