com.cloudera.crunch.lib
Class Sample.SamplerFn<S>

java.lang.Object
  extended by com.cloudera.crunch.DoFn<S,S>
      extended by com.cloudera.crunch.lib.Sample.SamplerFn<S>
All Implemented Interfaces:
Serializable
Enclosing class:
Sample

public static class Sample.SamplerFn<S>
extends DoFn<S,S>

See Also:
Serialized Form

Constructor Summary
Sample.SamplerFn(long seed, double acceptanceProbability)
           
 
Method Summary
 void initialize()
          Called during the setup of the MapReduce job this DoFn is associated with.
 void process(S input, Emitter<S> emitter)
          Processes the records from a PCollection.
 
Methods inherited from class com.cloudera.crunch.DoFn
cleanup, configure, getConfiguration, getCounter, getCounter, getStatus, getTaskAttemptID, progress, scaleFactor, setConfigurationForTest, setContext, setStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sample.SamplerFn

public Sample.SamplerFn(long seed,
                        double acceptanceProbability)
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<S,S>

process

public void process(S input,
                    Emitter<S> emitter)
Description copied from class: DoFn
Processes the records from a PCollection.

Specified by:
process in class DoFn<S,S>
Parameters:
input - The input record
emitter - The emitter to send the output to


Copyright © 2012. All Rights Reserved.