App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Static Public Attributes | List of all members
google.appengine.ext.mapreduce.input_readers.BlobstoreZipInputReader Class Reference
Inheritance diagram for google.appengine.ext.mapreduce.input_readers.BlobstoreZipInputReader:
google.appengine.ext.mapreduce.input_readers.InputReader google.appengine.ext.mapreduce.json_util.JsonMixin

Public Member Functions

def __init__
 
def next
 
def from_json
 
def to_json
 
def __str__
 
def validate
 
def split_input
 
- Public Member Functions inherited from google.appengine.ext.mapreduce.input_readers.InputReader
def __iter__
 
def next
 
def from_json
 
def to_json
 
def split_input
 
def validate
 
- Public Member Functions inherited from google.appengine.ext.mapreduce.json_util.JsonMixin
def to_json_str
 
def from_json_str
 

Static Public Attributes

string BLOB_KEY_PARAM = "blob_key"
 
string START_INDEX_PARAM = "start_index"
 
string END_INDEX_PARAM = "end_index"
 
- Static Public Attributes inherited from google.appengine.ext.mapreduce.input_readers.InputReader
 expand_parameters = False
 
string NAMESPACE_PARAM = "namespace"
 
string NAMESPACES_PARAM = "namespaces"
 

Detailed Description

Input reader for files from a zip archive stored in the Blobstore.

Each instance of the reader will read the TOC, from the end of the zip file,
and then only the contained files which it is responsible for.

Constructor & Destructor Documentation

def google.appengine.ext.mapreduce.input_readers.BlobstoreZipInputReader.__init__ (   self,
  blob_key,
  start_index,
  end_index,
  _reader = blobstore.BlobReader 
)
Initializes this instance with the given blob key and file range.

This BlobstoreZipInputReader will read from the file with index start_index
up to but not including the file with index end_index.

Args:
  blob_key: the BlobKey that this input reader is processing.
  start_index: the index of the first file to read.
  end_index: the index of the first file that will not be read.
  _reader: a callable that returns a file-like object for reading blobs.
  Used for dependency injection.

Member Function Documentation

def google.appengine.ext.mapreduce.input_readers.BlobstoreZipInputReader.__str__ (   self)
Returns the string representation of this BlobstoreZipInputReader.
def google.appengine.ext.mapreduce.input_readers.BlobstoreZipInputReader.from_json (   cls,
  json 
)
Creates an instance of the InputReader for the given input shard state.

Args:
  json: The InputReader state as a dict-like object.

Returns:
  An instance of the InputReader configured using the values of json.
def google.appengine.ext.mapreduce.input_readers.BlobstoreZipInputReader.next (   self)
Returns the next input from this input reader as (ZipInfo, opener) tuple.

Returns:
  The next input from this input reader, in the form of a 2-tuple.
  The first element of the tuple is a zipfile.ZipInfo object.
  The second element of the tuple is a zero-argument function that, when
  called, returns the complete body of the file.
def google.appengine.ext.mapreduce.input_readers.BlobstoreZipInputReader.split_input (   cls,
  mapper_spec,
  _reader = blobstore.BlobReader 
)
Returns a list of input shard states for the input spec.

Args:
  mapper_spec: The MapperSpec for this InputReader. Must contain
  'blob_key' parameter with one blob key.
  _reader: a callable that returns a file-like object for reading blobs.
  Used for dependency injection.

Returns:
  A list of InputReaders spanning files within the zip.
def google.appengine.ext.mapreduce.input_readers.BlobstoreZipInputReader.to_json (   self)
Returns an input shard state for the remaining inputs.

Returns:
  A json-izable version of the remaining InputReader.
def google.appengine.ext.mapreduce.input_readers.BlobstoreZipInputReader.validate (   cls,
  mapper_spec 
)
Validates mapper spec and all mapper parameters.

Args:
  mapper_spec: The MapperSpec for this InputReader.

Raises:
  BadReaderParamsError: required parameters are missing or invalid.

The documentation for this class was generated from the following file: