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

org.apache.crunch.lib.sort
Class SortFns.AvroGenericFn<V extends Tuple>

java.lang.Object
  extended by org.apache.crunch.DoFn<S,T>
      extended by org.apache.crunch.MapFn<V,org.apache.avro.generic.GenericRecord>
          extended by org.apache.crunch.lib.sort.SortFns.AvroGenericFn<V>
All Implemented Interfaces:
Serializable
Enclosing class:
SortFns

public static class SortFns.AvroGenericFn<V extends Tuple>
extends MapFn<V,org.apache.avro.generic.GenericRecord>

Pulls a composite set of keys from an Avro GenericRecord instance.

See Also:
Serialized Form

Constructor Summary
SortFns.AvroGenericFn(int[] indices, org.apache.avro.Schema schema)
           
 
Method Summary
 void initialize()
          Initialize this DoFn.
 org.apache.avro.generic.GenericRecord map(V input)
          Maps the given input into an instance of the output type.
 
Methods inherited from class org.apache.crunch.MapFn
process, scaleFactor
 
Methods inherited from class org.apache.crunch.DoFn
cleanup, configure, disableDeepCopy, setConfiguration, setContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortFns.AvroGenericFn

public SortFns.AvroGenericFn(int[] indices,
                             org.apache.avro.Schema schema)
Method Detail

initialize

public void initialize()
Description copied from class: DoFn
Initialize this DoFn. This initialization will happen before the actual DoFn.process(Object, Emitter) is triggered. Subclasses may override this method to do appropriate initialization.

Called during the setup of the job instance this DoFn is associated with.

Overrides:
initialize in class DoFn<V extends Tuple,org.apache.avro.generic.GenericRecord>

map

public org.apache.avro.generic.GenericRecord map(V input)
Description copied from class: MapFn
Maps the given input into an instance of the output type.

Specified by:
map in class MapFn<V extends Tuple,org.apache.avro.generic.GenericRecord>


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