com.cloudera.crunch.impl.mr.collect
Class PGroupedTableImpl<K,V>

java.lang.Object
  extended by com.cloudera.crunch.impl.mr.collect.PCollectionImpl<Pair<K,Iterable<V>>>
      extended by com.cloudera.crunch.impl.mr.collect.PGroupedTableImpl<K,V>
All Implemented Interfaces:
PCollection<Pair<K,Iterable<V>>>, PGroupedTable<K,V>

public class PGroupedTableImpl<K,V>
extends PCollectionImpl<Pair<K,Iterable<V>>>
implements PGroupedTable<K,V>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.cloudera.crunch.impl.mr.collect.PCollectionImpl
PCollectionImpl.Visitor
 
Field Summary
 
Fields inherited from class com.cloudera.crunch.impl.mr.collect.PCollectionImpl
pipeline
 
Method Summary
protected  void acceptInternal(PCollectionImpl.Visitor visitor)
           
 PTable<K,V> combineValues(CombineFn<K,V> combineFn)
          Combines the values of this grouping using the given CombineFn.
 void configureShuffle(org.apache.hadoop.mapreduce.Job job)
           
 DoNode createDoNode()
           
 DoNode getGroupingNode()
           
 List<PCollectionImpl<?>> getParents()
           
 PType<Pair<K,Iterable<V>>> getPType()
          Returns the PType of this PCollection.
protected  long getSizeInternal()
           
 PTable<K,V> ungroup()
          Convert this grouping back into a multimap.
 
Methods inherited from class com.cloudera.crunch.impl.mr.collect.PCollectionImpl
accept, count, filter, getDepth, getMaterializedAt, getName, getOnlyParent, getPipeline, getSize, getTypeFamily, materialize, materializeAt, max, min, parallelDo, parallelDo, parallelDo, parallelDo, sample, sample, sort, toString, union, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.cloudera.crunch.PCollection
count, filter, getName, getPipeline, getSize, getTypeFamily, materialize, max, min, parallelDo, parallelDo, parallelDo, parallelDo, sample, sample, sort, union, write
 

Method Detail

configureShuffle

public void configureShuffle(org.apache.hadoop.mapreduce.Job job)

getSizeInternal

protected long getSizeInternal()
Specified by:
getSizeInternal in class PCollectionImpl<Pair<K,Iterable<V>>>

getPType

public PType<Pair<K,Iterable<V>>> getPType()
Description copied from interface: PCollection
Returns the PType of this PCollection.

Specified by:
getPType in interface PCollection<Pair<K,Iterable<V>>>

combineValues

public PTable<K,V> combineValues(CombineFn<K,V> combineFn)
Description copied from interface: PGroupedTable
Combines the values of this grouping using the given CombineFn.

Specified by:
combineValues in interface PGroupedTable<K,V>
Parameters:
combineFn - The combiner function
Returns:
A PTable where each key has a single value

ungroup

public PTable<K,V> ungroup()
Description copied from interface: PGroupedTable
Convert this grouping back into a multimap.

Specified by:
ungroup in interface PGroupedTable<K,V>
Returns:
an ungrouped version of the data in this PGroupedTable.

acceptInternal

protected void acceptInternal(PCollectionImpl.Visitor visitor)
Specified by:
acceptInternal in class PCollectionImpl<Pair<K,Iterable<V>>>

getParents

public List<PCollectionImpl<?>> getParents()
Specified by:
getParents in class PCollectionImpl<Pair<K,Iterable<V>>>

createDoNode

public DoNode createDoNode()
Specified by:
createDoNode in class PCollectionImpl<Pair<K,Iterable<V>>>

getGroupingNode

public DoNode getGroupingNode()


Copyright © 2012. All Rights Reserved.