public interface PGroupedTable<K,V> extends PCollection<Pair<K,Iterable<V>>>
PTable, which corresponds to the output of
the shuffle phase of a MapReduce job.| Modifier and Type | Method and Description |
|---|---|
PTable<K,V> |
combineValues(Aggregator<V> aggregator)
Combine the values in each group using the given
Aggregator. |
PTable<K,V> |
combineValues(Aggregator<V> combineAggregator,
Aggregator<V> reduceAggregator)
Combine and reduces the values in each group using the given
Aggregator instances. |
PTable<K,V> |
combineValues(CombineFn<K,V> combineFn)
Combines the values of this grouping using the given
CombineFn. |
PTable<K,V> |
combineValues(CombineFn<K,V> combineFn,
CombineFn<K,V> reduceFn)
Combines and reduces the values of this grouping using the given
CombineFn instances. |
PGroupedTableType<K,V> |
getGroupedTableType()
Return the
PGroupedTableType containing serialization information for
this PGroupedTable. |
<U> PTable<K,U> |
mapValues(MapFn<Iterable<V>,U> mapFn,
PType<U> ptype)
Maps the
Iterable<V> elements of each record to a new type. |
<U> PTable<K,U> |
mapValues(String name,
MapFn<Iterable<V>,U> mapFn,
PType<U> ptype)
Maps the
Iterable<V> elements of each record to a new type. |
PTable<K,V> |
ungroup()
Convert this grouping back into a multimap.
|
aggregate, asCollection, asReadable, by, by, cache, cache, count, filter, filter, first, getName, getPipeline, getPType, getSize, getTypeFamily, length, materialize, max, min, parallelDo, parallelDo, parallelDo, parallelDo, parallelDo, parallelDo, sequentialDo, union, union, write, writePTable<K,V> combineValues(CombineFn<K,V> combineFn)
CombineFn.combineFn - The combiner functionPTable where each key has a single valuePTable<K,V> combineValues(CombineFn<K,V> combineFn, CombineFn<K,V> reduceFn)
CombineFn instances.combineFn - The combiner function during the combine phasereduceFn - The combiner function during the reduce phasePTable where each key has a single valuePTable<K,V> combineValues(Aggregator<V> aggregator)
Aggregator.aggregator - The function to usePTable where each group key maps to an aggregated
value. Group keys may be repeated if an aggregator returns
more than one value.PTable<K,V> combineValues(Aggregator<V> combineAggregator, Aggregator<V> reduceAggregator)
Aggregator instances.combineAggregator - The aggregator to use during the combine phasereduceAggregator - The aggregator to use during the reduce phasePTable where each group key maps to an aggregated
value. Group keys may be repeated if an aggregator returns
more than one value.<U> PTable<K,U> mapValues(MapFn<Iterable<V>,U> mapFn, PType<U> ptype)
Iterable<V> elements of each record to a new type. Just like
any parallelDo operation on a PGroupedTable, this may only be
called once.mapFn - The mapping functionptype - The serialization information for the returned dataPTable instance<U> PTable<K,U> mapValues(String name, MapFn<Iterable<V>,U> mapFn, PType<U> ptype)
Iterable<V> elements of each record to a new type. Just like
any parallelDo operation on a PGroupedTable, this may only be
called once.name - A name for this operationmapFn - The mapping functionptype - The serialization information for the returned dataPTable instancePTable<K,V> ungroup()
PGroupedTable.PGroupedTableType<K,V> getGroupedTableType()
PGroupedTableType containing serialization information for
this PGroupedTable.Copyright © 2015 The Apache Software Foundation. All Rights Reserved.