This project has retired. For details please refer to its
Attic page.
SwapFn (Apache Crunch 0.11.0 API)
org.apache.crunch.fn
Class SwapFn<V1,V2>
java.lang.Object
org.apache.crunch.DoFn<S,T>
org.apache.crunch.MapFn<Pair<V1,V2>,Pair<V2,V1>>
org.apache.crunch.fn.SwapFn<V1,V2>
- All Implemented Interfaces:
- Serializable
public class SwapFn<V1,V2>
- extends MapFn<Pair<V1,V2>,Pair<V2,V1>>
Swap the elements of a Pair
type.
- See Also:
- Serialized Form
SwapFn
public SwapFn()
ptype
public static <V1,V2> PType<Pair<V2,V1>> ptype(PType<Pair<V1,V2>> pt)
tableType
public static <K,V> PTableType<V,K> tableType(PTableType<K,V> ptt)
map
public Pair<V2,V1> map(Pair<V1,V2> input)
- Description copied from class:
MapFn
- Maps the given input into an instance of the output type.
- Specified by:
map
in class MapFn<Pair<V1,V2>,Pair<V2,V1>>
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.