Class PoissonSampleLoader

  extended by org.apache.pig.LoadFunc
      extended by org.apache.pig.impl.builtin.SampleLoader
          extended by org.apache.pig.impl.builtin.PoissonSampleLoader

public class PoissonSampleLoader
extends SampleLoader

See "Skewed Join sampler" in

Field Summary
Fields inherited from class org.apache.pig.impl.builtin.SampleLoader
loader, numSamples
Constructor Summary
PoissonSampleLoader(String funcSpec, String ns)
Method Summary
 Tuple getNext()
          Retrieves the next tuple to be processed.
 void prepareToRead(org.apache.hadoop.mapreduce.RecordReader reader, PigSplit split)
          Initializes LoadFunc for reading data.
Methods inherited from class org.apache.pig.impl.builtin.SampleLoader
computeSamples, getInputFormat, getLoadCaster, getNumSamples, relativeToAbsolutePath, setLocation, setNumSamples, setUDFContextSignature, skipNext
Methods inherited from class org.apache.pig.LoadFunc
getAbsolutePath, getPathStrings, join, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final String NUMROWS_TUPLE_MARKER
See Also:
Constant Field Values
Constructor Detail


public PoissonSampleLoader(String funcSpec,
                           String ns)
Method Detail


public Tuple getNext()
              throws IOException
Description copied from class: LoadFunc
Retrieves the next tuple to be processed. Implementations should NOT reuse tuple objects (or inner member objects) they return across calls and should return a different tuple object in each call.

Specified by:
getNext in class LoadFunc
the next tuple to be processed or null if there are no more tuples to be processed.
IOException - if there is an exception while retrieving the next tuple


public void prepareToRead(org.apache.hadoop.mapreduce.RecordReader reader,
                          PigSplit split)
                   throws IOException
Description copied from class: LoadFunc
Initializes LoadFunc for reading data. This will be called during execution before any calls to getNext. The RecordReader needs to be passed here because it has been instantiated for a particular InputSplit.

prepareToRead in class SampleLoader
reader - RecordReader to be used by this instance of the LoadFunc
split - The input PigSplit to process
IOException - if there is an exception during initialization

Copyright © 2007-2012 The Apache Software Foundation