|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.crunch.impl.dist.collect.PCollectionImpl<Pair<K,Iterable<V>>>
org.apache.crunch.impl.dist.collect.BaseGroupedTable<K,V>
public class BaseGroupedTable<K,V>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.crunch.impl.dist.collect.PCollectionImpl |
|---|
PCollectionImpl.Visitor |
| Method Summary | ||
|---|---|---|
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()
|
|
|
mapValues(MapFn<Iterable<V>,U> mapFn,
PType<U> ptype)
Maps the Iterable<V> elements of each record to a new type. |
|
|
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. |
|
| Methods inherited from class org.apache.crunch.impl.dist.collect.PCollectionImpl |
|---|
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, write |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.crunch.PCollection |
|---|
aggregate, 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, write |
| Method Detail |
|---|
public PType<Pair<K,Iterable<V>>> getPType()
PCollectionPType of this PCollection.
getPType in interface PCollection<Pair<K,Iterable<V>>>
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 phase
PTable 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 function
PTable 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 use
PTable 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 phase
PTable 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()
PGroupedTable
ungroup 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 data
PTable instance
public <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 data
PTable 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>>>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||