public class BaseGroupedTable<K,V> extends PCollectionImpl<Pair<K,Iterable<V>>> implements PGroupedTable<K,V>
PCollectionImpl.Visitor| Modifier and Type | Method and Description |
|---|---|
PTable<K,V> |
combineValues(Aggregator<V> agg)
Combine the values in each group using the given
Aggregator. |
PTable<K,V> |
combineValues(Aggregator<V> combineAgg,
Aggregator<V> reduceAgg)
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. |
long |
getLastModifiedAt()
The time of the most recent modification to one of the input sources to the collection.
|
List<PCollectionImpl<?>> |
getParents() |
PType<Pair<K,Iterable<V>>> |
getPType()
Returns the
PType of this PCollection. |
Set<Target> |
getTargetDependencies() |
<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.
|
accept, aggregate, asCollection, asReadable, by, by, cache, cache, count, filter, filter, first, getDepth, getMaterializedAt, getName, getOnlyParent, getParallelDoOptions, getPipeline, getSize, getTypeFamily, isBreakpoint, length, materialize, materializeAt, max, min, parallelDo, parallelDo, parallelDo, parallelDo, parallelDo, parallelDo, sequentialDo, setBreakpoint, toString, union, union, write, writeequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaggregate, asCollection, asReadable, by, by, cache, cache, count, filter, filter, first, getName, getPipeline, getSize, getTypeFamily, length, materialize, max, min, parallelDo, parallelDo, parallelDo, parallelDo, parallelDo, parallelDo, sequentialDo, union, union, write, writepublic PType<Pair<K,Iterable<V>>> getPType()
PCollectionPType of this PCollection.public PTable<K,V> combineValues(CombineFn<K,V> combineFn, CombineFn<K,V> reduceFn)
PGroupedTableCombineFn instances.combineValues in interface PGroupedTable<K,V>combineFn - The combiner function during the combine phasereduceFn - The combiner function during the reduce phasePTable where each key has a single valuepublic PTable<K,V> combineValues(CombineFn<K,V> combineFn)
PGroupedTableCombineFn.combineValues in interface PGroupedTable<K,V>combineFn - The combiner functionPTable where each key has a single valuepublic PTable<K,V> combineValues(Aggregator<V> agg)
PGroupedTableAggregator.combineValues in interface PGroupedTable<K,V>agg - 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.public PTable<K,V> combineValues(Aggregator<V> combineAgg, Aggregator<V> reduceAgg)
PGroupedTableAggregator instances.combineValues in interface PGroupedTable<K,V>combineAgg - The aggregator to use during the combine phasereduceAgg - 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.public PTable<K,V> ungroup()
PGroupedTableungroup in interface PGroupedTable<K,V>PGroupedTable.public <U> PTable<K,U> mapValues(MapFn<Iterable<V>,U> mapFn, PType<U> ptype)
PGroupedTableIterable<V> elements of each record to a new type. Just like
any parallelDo operation on a PGroupedTable, this may only be
called once.mapValues in interface PGroupedTable<K,V>mapFn - The mapping functionptype - The serialization information for the returned dataPTable instancepublic <U> PTable<K,U> mapValues(String name, MapFn<Iterable<V>,U> mapFn, PType<U> ptype)
PGroupedTableIterable<V> elements of each record to a new type. Just like
any parallelDo operation on a PGroupedTable, this may only be
called once.mapValues in interface PGroupedTable<K,V>name - A name for this operationmapFn - The mapping functionptype - The serialization information for the returned dataPTable instancepublic PGroupedTableType<K,V> getGroupedTableType()
PGroupedTablePGroupedTableType containing serialization information for
this PGroupedTable.getGroupedTableType in interface PGroupedTable<K,V>public Set<Target> getTargetDependencies()
getTargetDependencies in class PCollectionImpl<Pair<K,Iterable<V>>>public List<PCollectionImpl<?>> getParents()
getParents in class PCollectionImpl<Pair<K,Iterable<V>>>public long getLastModifiedAt()
PCollectionImpl-1 should be returned.getLastModifiedAt in class PCollectionImpl<Pair<K,Iterable<V>>>Copyright © 2015 The Apache Software Foundation. All Rights Reserved.