|
def | __del__ (self) |
|
def | __init__ (self, kmr_or_ckvs, keyty="opaque", valty="opaque") |
|
def | add (self, key, val) |
|
def | add_kv (self, key, val) |
|
def | add_kv_done (self) |
|
def | concatenate (self, morekvs) |
|
def | distribute (self, cyclic, mopts) |
|
def | free (self) |
|
def | get_element_count (self) |
|
def | get_field_type (self, key_or_value) |
|
def | local_element_count (self) |
|
def | map (self, fn, mopts) |
|
def | map_for_some (self, fn, mopts) |
|
def | map_ms (self, fn, mopts) |
|
def | map_ms_commands (self, fn, xopts) |
|
def | map_on_rank_zero (self, fn, mopts) |
|
def | map_once (self, rank_zero_only, fn, mopts) |
|
def | map_parallel_processes (self, fn, sopts) |
|
def | map_processes (self, nonmpi, fn, sopts) |
|
def | map_rank_by_rank (self, fn, mopts) |
|
def | map_serial_processes (self, fn, sopts) |
|
def | map_via_spawn (self, fn, xopts) |
|
def | read_file_by_segments (self, filename, color) |
|
def | read_files_reassemble (self, filename, color, offset, bytes_) |
|
def | reduce (self, fn, mopts) |
|
def | reduce_as_one (self, fn, mopts) |
|
def | reduce_for_some (self, fn, mopts) |
|
def | replicate (self, mopts) |
|
def | restore (self, data) |
|
def | reverse (self, mopts) |
|
def | save (self) |
|
def | shuffle (self, mopts) |
|
def | sort (self, mopts) |
|
def | sort_locally (self, shuffling, mopts) |
|
KVS. Note that there are dummy KVS'es which are temporarily
created to hold the C structure of the KVS passed to
mapper/reducer functions. A dummy KVS has None in its "mr"
attribute.
Definition at line 833 of file kmr4py.py.
def kmr4py.KVS.__init__ |
( |
|
self, |
|
|
|
kmr_or_ckvs, |
|
|
|
keyty = "opaque" , |
|
|
|
valty = "opaque" |
|
) |
| |
Makes a KVS for a given KMR. Do not call the KVS constructor
directly, but use KMR.make_kvs() instead. A KVS is created
with the datatypes stored in the key and the value, specified
by the keywords "key=" and "value=". The datatype name is a
string, one of "opaque", "cstring", "integer", and "float8".
Most mappers and reducers (precisely, the methods that accepts
a function argument) take keyword arguments for the types,
defaulting with key="opaque" and value="opaque". The
datatypes affects the sorting order.
Definition at line 841 of file kmr4py.py.