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

Class SortFns.AvroGenericFn<V extends Tuple>

  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:
Enclosing class:

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


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


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.

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


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.