org.apache.crunch.types.writable
Class WritableGroupedTableType<K,V>
java.lang.Object
org.apache.crunch.types.PGroupedTableType<K,V>
org.apache.crunch.types.writable.WritableGroupedTableType<K,V>
- All Implemented Interfaces:
- Serializable, PType<Pair<K,Iterable<V>>>
public class WritableGroupedTableType<K,V>
- extends PGroupedTableType<K,V>
- See Also:
- Serialized Form
WritableGroupedTableType
public WritableGroupedTableType(org.apache.crunch.types.writable.WritableTableType<K,V> tableType)
getTypeClass
public Class<Pair<K,Iterable<V>>> getTypeClass()
- Description copied from interface:
PType
- Returns the Java type represented by this
PType
.
getGroupingConverter
public Converter getGroupingConverter()
- Specified by:
getGroupingConverter
in class PGroupedTableType<K,V>
getInputMapFn
public MapFn getInputMapFn()
getOutputMapFn
public MapFn getOutputMapFn()
getDetachedValue
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.
- Parameters:
value
- The value to be deep-copied
- Returns:
- A deep copy of the input value
configureShuffle
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.