com.cloudera.crunch.util
Class PTypes.ThriftInputMapFn<T extends org.apache.thrift.TBase>

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

public static class PTypes.ThriftInputMapFn<T extends org.apache.thrift.TBase>
extends MapFn<ByteBuffer,T>

See Also:
Serialized Form

Constructor Summary
PTypes.ThriftInputMapFn(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 com.cloudera.crunch.MapFn
process, scaleFactor
 
Methods inherited from class com.cloudera.crunch.DoFn
cleanup, configure, getConfiguration, getCounter, getCounter, getStatus, getTaskAttemptID, progress, setConfigurationForTest, setContext, setStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PTypes.ThriftInputMapFn

public PTypes.ThriftInputMapFn(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 org.apache.thrift.TBase>

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 org.apache.thrift.TBase>


Copyright © 2012. All Rights Reserved.