orch.keyval
Outputs key-value pairs in a MapReduce job.
Usage
orch.keyval(
key,
value)
Arguments
- key
-
A scalar value.
- value
-
A data structure such as a scalar, list, data frame, or vector.
Usage Notes
This function can only be used in the mapper, reducer, or combiner arguments of hadoop.exec and hadoop.run. Because the orch.keyval function is not exposed in the ORCH client API, you cannot call it anywhere else.
Return Value
(key, value) structures
Example
This code fragment creates a mapper function using orch.keyval:
hadoop.run(data,
mapper = function(k,v) {
orch.keyval(k,v)
})