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

Public Member Functions

def __init__
 
def reset_for_retry
 
def advance_for_next_slice
 
def to_dict
 
def from_request
 

Public Attributes

 base_path
 
 mapreduce_spec
 
 shard_id
 
 slice_id
 
 input_reader
 
 initial_input_reader
 
 output_writer
 
 retries
 
 handler
 

Detailed Description

A shard's states that are kept in task payload.

TransientShardState holds two types of states:
1. Some states just don't need to be saved to datastore. e.g.
   serialized input reader and output writer instances.
2. Some states are duplicated from datastore, e.g. slice_id, shard_id.
   These are used to validate the task.

Constructor & Destructor Documentation

def google.appengine.ext.mapreduce.model.TransientShardState.__init__ (   self,
  base_path,
  mapreduce_spec,
  shard_id,
  slice_id,
  input_reader,
  initial_input_reader,
  output_writer = None,
  retries = 0,
  handler = None 
)
Init.

Args:
  base_path: base path of this mapreduce job. Deprecated.
  mapreduce_spec: an instance of MapReduceSpec.
  shard_id: shard id.
  slice_id: slice id. When enqueuing task for the next slice, this number
is incremented by 1.
  input_reader: input reader instance for this shard.
  initial_input_reader: the input reader instance before any iteration.
Used by shard retry.
  output_writer: output writer instance for this shard, if exists.
  retries: the number of retries of the current shard. Used to drop
tasks from old retries.
  handler: map/reduce handler.

Member Function Documentation

def google.appengine.ext.mapreduce.model.TransientShardState.advance_for_next_slice (   self,
  recovery_slice = False 
)
Advance relavent states for next slice.

Args:
  recovery_slice: True if this slice is running recovery logic.
See handlers.MapperWorkerCallbackHandler._attempt_slice_recovery
for more info.
def google.appengine.ext.mapreduce.model.TransientShardState.from_request (   cls,
  request 
)
Create new TransientShardState from webapp request.
def google.appengine.ext.mapreduce.model.TransientShardState.reset_for_retry (   self,
  output_writer 
)
Reset self for shard retry.

Args:
  output_writer: new output writer that contains new output files.
def google.appengine.ext.mapreduce.model.TransientShardState.to_dict (   self)
Convert state to dictionary to save in task payload.

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