parkour.toolbox documentation

Utility collection of common task functions.


(bound-reducers-splits job)
Convenience cstep for potentially small jobs, bounding the configured number
of reducers to be no greater than the number of input splits.


(by-p _ f)
Partitioner for partitioning by the result of applying a provided function
`f` to each tuple key.


(identity-t coll)(identity-t in-shape out-shape coll)
Identity task function.  Accepts optional `in-shape` and `out-shape`
tuple-shaping functions or keywords, using `:default` if not provided.  Applies
input and output shapes to `coll`.


(keyvalgroups-r f coll)(keyvalgroups-r f init coll)
Expect `coll` to consist of key/val-group pairs.  Yield tuples of each key
and the result of `reduce`ing the val-group with `f` and optional `init`.


(nth0-p k _ nparts)
Partitioner for partitioning on initial element of key.