Prev
Next
Chapter 3. Python Libraries
3.1. Overview
3.2. API
3.2.1. Class Wmr
3.3. Example Usage
3.1. Overview
The Python libraries (versions 2 and 3) for WebMapReduce expect the mapper and reducer to be defined by the following functions:
function
mapper
(
key
,
value
)
Map the input pair composed of
key
and
value
. Both arguments are strings.
function
reducer
(
key
,
values
)
Reduce the intermediate
values
associated with
key
.
values
is an iterator that yields string values, and
key
is a string.
Output is given through the
Wmr.emit(key, value)
function.
Prev
2.6.4. Submit as a Standard Job
Up
Home
Next
3.2. API