Description Usage Arguments Details Value See Also Examples
Helper function to construct R structure describing a
Reduce task. To be used to satisfy the ...
argument
of mantaJob.setup
and specify the Unix command line
task, any initialization tasks, an array of Manta
filesystem asset
files, and the memory/disk size to
be used for the compute instance on Manta.
1 | mantaReduce(exec, init, assets, reducers, memory, disk)
|
reducers |
integer. Number of reducers to use from 1 to 1024. Use with caution. |
exec |
character required. The Unix shell command to
be executed in the Map task operating on the input Manta
objects specified when the job is launched. |
init |
character optional. A Unix shell command
executed prior to the |
assets |
array of character, optional. Specify Manta
objects that are to be accessed by the compute node at
job runtime. Include shell scripts, installation steps
configuration steps, custom executables compiled for
SmartOS, or |
memory |
integer optional. Amount of memory
requested for Manta compute node instance. |
disk |
integer optional. Amount of temporary working
disk (not Manta storage space) to be used by the compute
node when executing the task. Valid values are: |
On Manta, a Reduce task phase executes a generic UNIX
command when specified in mantaJob.launch
, or from
the output pipelined from a previous step. Use
mantaReduce
to run a job that has no Manta object
input data.
The exec
argument must be a valid generic UNIX
command line, not an R function. The exec
argument
may call executables or runtime language scripts that are
hosted on Manta and specified as assets
. The
init
parameter command is called before the
exec
argument and is not passed input. The init
argument may be used, for example to extract scripts from
an asset
on Manta saved as a tar
object.
Note that you do not have to specify the input for a Reduce
task for mantaJob.launch
, the service pipes the
output of the previous Map task phase as input to the
Reduce task. Note also tha the piped input for a Reduce
task may arrive in any order, no sorting is done by the
service to the pipe between Map and Reduce tasks.
Returns an R list for consumption by mantaJob.setup
Other mantaJobs: mantaJob.cancel
;
mantaJob.done
;
mantaJob.errors.stderr
;
mantaJob.errors
;
mantaJob.failures
;
mantaJob.inputs
;
mantaJob.launch
;
mantaJob.outputs.cat
;
mantaJob.outputs
;
mantaJob.setup
;
mantaJob.status
;
mantaJobs.running
;
mantaJobs.tail
; mantaJobs
;
mantaMap
1 2 3 4 5 6 7 | ## Not run:
# Example - Map/Reduce Unix Word Count
job <- mantaJob.setup("word count",
mantaMap("wc"),
mantaReduce("awk '{ l += $1; w += $2; c += $3 } END { print l, w, c }'"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.