public abstract class CombineFn<S,T> extends DoFn<Pair<S,Iterable<T>>,Pair<S,T>>
DoFn
implementation that converts an Iterable
of
values into a single value. If a CombineFn
instance is used on a
PGroupedTable
, the function will be applied to the output of the map
stage before the data is passed to the reducer, which can improve the runtime
of certain classes of jobs.
Note that the incoming Iterable
can only be used to create an
Iterator
once. Calling Iterable.iterator()
method a second
time will throw an IllegalStateException
.
Constructor and Description |
---|
CombineFn() |
cleanup, configure, disableDeepCopy, initialize, process, scaleFactor, setConfiguration, setContext
Copyright © 2016 The Apache Software Foundation. All rights reserved.