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.api.map_job.map_job_context.ShardContext Class Reference
Inheritance diagram for google.appengine.ext.mapreduce.api.map_job.map_job_context.ShardContext:

Public Member Functions

def __init__
 
def incr
 
def counter
 

Public Attributes

 job_context
 
 id
 
 number
 
 attempt
 

Detailed Description

Context for a shard.

Constructor & Destructor Documentation

def google.appengine.ext.mapreduce.api.map_job.map_job_context.ShardContext.__init__ (   self,
  job_context,
  shard_state 
)
Init.

The signature of __init__ is subject to change.

Read only properties:
  job_context: JobContext object.
  id: str. of format job_id-shard_number.
  number: int. shard number. 0 indexed.
  attempt: int. The current attempt at executing this shard.
Starting at 1.

Args:
  job_context: map_job.JobConfig.
  shard_state: model.ShardState.

Member Function Documentation

def google.appengine.ext.mapreduce.api.map_job.map_job_context.ShardContext.counter (   self,
  counter_name,
  default = 0 
)
Get the current counter value.

Args:
  counter_name: name of the counter in string.
  default: default value in int if one doesn't exist.

Returns:
  Current value of the counter.
def google.appengine.ext.mapreduce.api.map_job.map_job_context.ShardContext.incr (   self,
  counter_name,
  delta = 1 
)
Changes counter by delta.

Args:
  counter_name: the name of the counter to change. str.
  delta: int.

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