|
| job_context |
|
| id |
|
| number |
|
| attempt |
|
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.
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:
- code/googleappengine-read-only/python/google/appengine/ext/mapreduce/api/map_job/map_job_context.py