This project has retired. For details please refer to its Attic page.
Converter (Apache Crunch 0.11.0 API)

org.apache.crunch.types
Interface Converter<K,V,S,T>

All Superinterfaces:
Serializable

public interface Converter<K,V,S,T>
extends Serializable

Converts the input key/value from a MapReduce task into the input to a DoFn, or takes the output of a DoFn and write it to the output key/values.


Method Summary
 boolean applyPTypeTransforms()
          If true, convert the inputs or outputs from this Converter instance before (for outputs) or after (for inputs) using the associated PType#getInputMapFn and PType#getOutputMapFn calls.
 S convertInput(K key, V value)
           
 T convertIterableInput(K key, Iterable<V> value)
           
 Class<K> getKeyClass()
           
 Class<V> getValueClass()
           
 K outputKey(S value)
           
 V outputValue(S value)
           
 

Method Detail

convertInput

S convertInput(K key,
               V value)

convertIterableInput

T convertIterableInput(K key,
                       Iterable<V> value)

outputKey

K outputKey(S value)

outputValue

V outputValue(S value)

getKeyClass

Class<K> getKeyClass()

getValueClass

Class<V> getValueClass()

applyPTypeTransforms

boolean applyPTypeTransforms()
If true, convert the inputs or outputs from this Converter instance before (for outputs) or after (for inputs) using the associated PType#getInputMapFn and PType#getOutputMapFn calls.



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