This project has retired. For details please refer to its Attic page.
PTypes.ProtoInputMapFn (Apache Crunch 0.3.0-incubating API)

org.apache.crunch.util
Class PTypes.ProtoInputMapFn<T extends com.google.protobuf.Message>

java.lang.Object
  extended by org.apache.crunch.DoFn<S,T>
      extended by org.apache.crunch.MapFn<ByteBuffer,T>
          extended by org.apache.crunch.util.PTypes.ProtoInputMapFn<T>
All Implemented Interfaces:
Serializable
Enclosing class:
PTypes

public static class PTypes.ProtoInputMapFn<T extends com.google.protobuf.Message>
extends MapFn<ByteBuffer,T>

See Also:
Serialized Form

Constructor Summary
PTypes.ProtoInputMapFn(Class<T> clazz)
           
 
Method Summary
 void initialize()
          Called during the setup of the MapReduce job this DoFn is associated with.
 T map(ByteBuffer bb)
          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, setConfigurationForTest, setContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PTypes.ProtoInputMapFn

public PTypes.ProtoInputMapFn(Class<T> clazz)
Method Detail

initialize

public void initialize()
Description copied from class: DoFn
Called during the setup of the MapReduce job this DoFn is associated with. Subclasses may override this method to do appropriate initialization.

Overrides:
initialize in class DoFn<ByteBuffer,T extends com.google.protobuf.Message>

map

public T map(ByteBuffer bb)
Description copied from class: MapFn
Maps the given input into an instance of the output type.

Specified by:
map in class MapFn<ByteBuffer,T extends com.google.protobuf.Message>


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