Class AvroGroupedTableType<K,V>

  extended by org.apache.crunch.types.PGroupedTableType<K,V>
      extended by org.apache.crunch.types.avro.AvroGroupedTableType<K,V>
All Implemented Interfaces:
Serializable, PType<Pair<K,Iterable<V>>>

public class AvroGroupedTableType<K,V>
extends PGroupedTableType<K,V>

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.crunch.types.PGroupedTableType
Constructor Summary
AvroGroupedTableType(AvroTableType<K,V> tableType)
Method Summary
 void configureShuffle(org.apache.hadoop.mapreduce.Job job, GroupingOptions options)
 Pair<K,Iterable<V>> getDetachedValue(Pair<K,Iterable<V>> value)
          Returns a copy of a value (or the value itself) that can safely be retained.
 Converter getGroupingConverter()
 MapFn getInputMapFn()
 MapFn getOutputMapFn()
 Class<Pair<K,Iterable<V>>> getTypeClass()
          Returns the Java type represented by this PType.
Methods inherited from class org.apache.crunch.types.PGroupedTableType
getConverter, getDefaultFileSource, getFamily, getSubTypes, getTableType
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public AvroGroupedTableType(AvroTableType<K,V> tableType)
Method Detail


public Class<Pair<K,Iterable<V>>> getTypeClass()
Description copied from interface: PType
Returns the Java type represented by this PType.


public Converter getGroupingConverter()
Specified by:
getGroupingConverter in class PGroupedTableType<K,V>


public MapFn getInputMapFn()


public MapFn getOutputMapFn()


public Pair<K,Iterable<V>> getDetachedValue(Pair<K,Iterable<V>> value)
Description copied from interface: PType
Returns a copy of a value (or the value itself) that can safely be retained.

This is useful when iterable values being processed in a DoFn (via a reducer) need to be held on to for more than the scope of a single iteration, as a reducer (and therefore also a DoFn that has an Iterable as input) re-use deserialized values. More information on object reuse is available in the DoFn class documentation.

value - The value to be deep-copied
A deep copy of the input value


public void configureShuffle(org.apache.hadoop.mapreduce.Job job,
                             GroupingOptions options)
Specified by:
configureShuffle in class PGroupedTableType<K,V>

Copyright © 2012 The Apache Software Foundation. All Rights Reserved.