reduceContext.write(options)
Method Description |
Writes key-value pairs. |
Returns |
Void |
Since |
2015.2 |
Parameters
Note:
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
options.key |
String or object. However, note that if you provide an object, the system calls JSON.stringify() on your input. |
required |
The key to write. |
options.value |
required |
The value to write |
Syntax
The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see Map/Reduce Script Samples.
...
function reduce(context)
{
context.write({
key: context.key,
value: context.values.length
});
}
...