![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | __init__ |
def | get_handler |
def | input_reader_class |
def | output_writer_class |
def | to_json |
def | __str__ |
def | from_json |
def | __eq__ |
![]() | |
def | to_json_str |
def | from_json_str |
Public Attributes | |
handler_spec | |
input_reader_spec | |
output_writer_spec | |
shard_count | |
params | |
Properties | |
handler = property(get_handler) | |
Contains a specification for the mapper phase of the mapreduce. MapperSpec instance can be changed only during mapreduce starting process, and it remains immutable for the rest of mapreduce execution. MapperSpec is passed as a payload to all mapreduce tasks in JSON encoding as part of MapreduceSpec. Specifying mapper handlers: * '<module_name>.<class_name>' - __call__ method of class instance will be called * '<module_name>.<function_name>' - function will be called. * '<module_name>.<class_name>.<method_name>' - class will be instantiated and method called.
def google.appengine.ext.mapreduce.model.MapperSpec.__init__ | ( | self, | |
handler_spec, | |||
input_reader_spec, | |||
params, | |||
shard_count, | |||
output_writer_spec = None |
|||
) |
Creates a new MapperSpec. Args: handler_spec: handler specification as string (see class doc for details). input_reader_spec: The class name of the input reader to use. params: Dictionary of additional parameters for the mapper. shard_count: number of shards to process in parallel. Properties: handler_spec: name of handler class/function to use. input_reader_spec: The class name of the input reader to use. params: Dictionary of additional parameters for the mapper. shard_count: number of shards to process in parallel. output_writer_spec: The class name of the output writer to use.
def google.appengine.ext.mapreduce.model.MapperSpec.from_json | ( | cls, | |
json | |||
) |
Creates MapperSpec from a dict-like object.
def google.appengine.ext.mapreduce.model.MapperSpec.get_handler | ( | self | ) |
Get mapper handler instance. This always creates a new instance of the handler. If the handler is a callable instance, MR only wants to create a new instance at the beginning of a shard or shard retry. The pickled callable instance should be accessed from TransientShardState. Returns: handler instance as callable.
def google.appengine.ext.mapreduce.model.MapperSpec.input_reader_class | ( | self | ) |
Get input reader class. Returns: input reader class object.
def google.appengine.ext.mapreduce.model.MapperSpec.output_writer_class | ( | self | ) |
Get output writer class. Returns: output writer class object.
def google.appengine.ext.mapreduce.model.MapperSpec.to_json | ( | self | ) |
Serializes this MapperSpec into a json-izable object.