reduceContext.values
Property Description |
This array holds all values associated with a unique key that was passed to the reduce stage for processing. These values are listed in lexicographical order. When the map/reduce process includes a map stage, the key-value pairs passed to the reduce stage are derived from the values written by mapContext.write(options). When the map stage is skipped, the values are determined by the getInputData stage:
Note:
Each value cannot exceed 1 megabyte. |
Type |
string[] |
Since |
2015.2 |
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
});
}
...