"MapReduce-MPI WWW Site"_mws - "MapReduce-MPI Documentation"_md :c

:link(mws,http://www.cs.sandia.gov/~sjplimp/mapreduce.html)
:link(md,Manual.html)

:line

MapReduce convert() method :h3

int MapReduce::convert() :pre

This calls the convert() method of a MapReduce object, which converts
a KeyValue object into a KeyMultiValue object.  It does this by
finding duplicate keys (stored only by this processor) and
concatenating their values into a list of values which it associates
with the key in the KeyMultiValue object.  The method returns the
total number of key/value pairs in the KeyMultiValue object, which
will be the number of unique keys in the KeyValue object.

This operation creates a hash table to find duplicate keys
efficiently.  More details are given in the "Technical
Details"_technical.html section.

This method is an on-processor operation, requiring no communication.
When run in parallel, each processor converts only the key/value pairs
it owns into key/multi-value pairs.  Thus, this operation is typically
performed only after the "aggregate()"_aggregate.html method has
collected all duplicate keys to the same processor.  The
"collate()"_collate.html method performs an
"aggregate()"_aggregate.html followed by a convert().

:line

[Related methods]: "collate()"_collate.html
