|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 |
Field Summary | |
---|---|
protected GroupingOptions |
groupingOptions
|
protected PTableBase<K,V> |
parent
|
protected PGroupedTableType<K,V> |
ptype
|
Fields inherited from class org.apache.crunch.impl.dist.collect.PCollectionImpl |
---|
doOptions, materializedAt, pipeline |
Constructor Summary | |
---|---|
protected |
BaseGroupedTable(PTableBase<K,V> parent)
|
protected |
BaseGroupedTable(PTableBase<K,V> parent,
GroupingOptions groupingOptions)
|
Method Summary | ||
---|---|---|
protected void |
acceptInternal(PCollectionImpl.Visitor visitor)
|
|
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. |
|
protected PCollectionImpl<Pair<K,Iterable<V>>> |
getChainingCollection()
Retrieve the PCollectionImpl to be used for chaining within PCollectionImpls further down the pipeline. |
|
PGroupedTableType<K,V> |
getGroupedTableType()
Return the PGroupedTableType containing serialization information for
this PGroupedTable . |
|
long |
getLastModifiedAt()
|
|
List<PCollectionImpl<?>> |
getParents()
|
|
PType<Pair<K,Iterable<V>>> |
getPType()
Returns the PType of this PCollection . |
|
protected ReadableData<Pair<K,Iterable<V>>> |
getReadableDataInternal()
|
|
protected long |
getSizeInternal()
|
|
Set<SourceTarget<?>> |
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, asCollection, asReadable, by, by, cache, cache, count, filter, filter, getDepth, getMaterializedAt, getName, getOnlyParent, getParallelDoOptions, getPipeline, getSize, getTypeFamily, isBreakpoint, length, materialize, materializeAt, materializedData, max, min, parallelDo, parallelDo, parallelDo, parallelDo, parallelDo, parallelDo, setBreakpoint, toString, union, union, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.crunch.PCollection |
---|
asCollection, asReadable, by, by, cache, cache, count, filter, filter, getName, getPipeline, getSize, getTypeFamily, length, materialize, max, min, parallelDo, parallelDo, parallelDo, parallelDo, parallelDo, parallelDo, union, union, write, write |
Field Detail |
---|
protected final PTableBase<K,V> parent
protected final GroupingOptions groupingOptions
protected final PGroupedTableType<K,V> ptype
Constructor Detail |
---|
protected BaseGroupedTable(PTableBase<K,V> parent)
protected BaseGroupedTable(PTableBase<K,V> parent, GroupingOptions groupingOptions)
Method Detail |
---|
protected ReadableData<Pair<K,Iterable<V>>> getReadableDataInternal()
getReadableDataInternal
in class PCollectionImpl<Pair<K,Iterable<V>>>
protected long getSizeInternal()
getSizeInternal
in class PCollectionImpl<Pair<K,Iterable<V>>>
public PType<Pair<K,Iterable<V>>> getPType()
PCollection
PType
of this PCollection
.
getPType
in interface PCollection<Pair<K,Iterable<V>>>
public PTable<K,V> combineValues(CombineFn<K,V> combineFn, CombineFn<K,V> reduceFn)
PGroupedTable
CombineFn
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)
PGroupedTable
CombineFn
.
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)
PGroupedTable
Aggregator
.
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)
PGroupedTable
Aggregator
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)
PGroupedTable
Iterable<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
instancepublic <U> PTable<K,U> mapValues(String name, MapFn<Iterable<V>,U> mapFn, PType<U> ptype)
PGroupedTable
Iterable<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()
PGroupedTable
PGroupedTableType
containing serialization information for
this PGroupedTable
.
getGroupedTableType
in interface PGroupedTable<K,V>
public Set<SourceTarget<?>> getTargetDependencies()
getTargetDependencies
in class PCollectionImpl<Pair<K,Iterable<V>>>
public List<PCollectionImpl<?>> getParents()
getParents
in class PCollectionImpl<Pair<K,Iterable<V>>>
public long getLastModifiedAt()
getLastModifiedAt
in class PCollectionImpl<Pair<K,Iterable<V>>>
protected void acceptInternal(PCollectionImpl.Visitor visitor)
acceptInternal
in class PCollectionImpl<Pair<K,Iterable<V>>>
protected PCollectionImpl<Pair<K,Iterable<V>>> getChainingCollection()
PCollectionImpl
getChainingCollection
in class PCollectionImpl<Pair<K,Iterable<V>>>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |