|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crunch.types.avro.AvroType<Pair<K,V>> org.apache.crunch.types.avro.AvroTableType<K,V>
public class AvroTableType<K,V>
The implementation of the PTableType interface for Avro-based serialization.
Constructor Summary | |
---|---|
AvroTableType(AvroType<K> keyType,
AvroType<V> valueType,
Class<Pair<K,V>> pairClass)
|
Method Summary | |
---|---|
Pair<K,V> |
getDetachedValue(Pair<K,V> value)
Returns a copy of a value (or the value itself) that can safely be retained. |
PGroupedTableType<K,V> |
getGroupedTableType()
Returns the grouped table version of this type. |
PType<K> |
getKeyType()
Returns the key type for the table. |
PType<V> |
getValueType()
Returns the value type for the table. |
Methods inherited from class org.apache.crunch.types.avro.AvroType |
---|
equals, getConverter, getDefaultFileSource, getFamily, getInputMapFn, getOutputMapFn, getSchema, getSubTypes, getTypeClass, hashCode, hasReflect, hasSpecific, initialize, isGeneric |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.crunch.types.PType |
---|
getConverter, getDefaultFileSource, getFamily, getInputMapFn, getOutputMapFn, getSubTypes, getTypeClass, initialize |
Constructor Detail |
---|
public AvroTableType(AvroType<K> keyType, AvroType<V> valueType, Class<Pair<K,V>> pairClass)
Method Detail |
---|
public PType<K> getKeyType()
PTableType
getKeyType
in interface PTableType<K,V>
public PType<V> getValueType()
PTableType
getValueType
in interface PTableType<K,V>
public PGroupedTableType<K,V> getGroupedTableType()
PTableType
getGroupedTableType
in interface PTableType<K,V>
public Pair<K,V> getDetachedValue(Pair<K,V> value)
PType
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.
getDetachedValue
in interface PType<Pair<K,V>>
getDetachedValue
in class AvroType<Pair<K,V>>
value
- The value to be deep-copied
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |