org.apache.pig.impl.builtin
Class PoissonSampleLoader

java.lang.Object
  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 http://wiki.apache.org/pig/PigSampler


Field Summary
static String NUMROWS_TUPLE_MARKER
           
 
Fields inherited from class org.apache.pig.impl.builtin.SampleLoader
loader, numSamples
 
Constructor Summary
PoissonSampleLoader(String funcSpec, String ns)
           
 
Method Summary
 void computeSamples(ArrayList<Pair<FileSpec,Boolean>> inputs, PigContext pc)
          Computes the number of samples for the loader
 Tuple getNext()
          Retrieves the next tuple to be processed.
 
Methods inherited from class org.apache.pig.impl.builtin.SampleLoader
getInputFormat, getLoadCaster, getNumSamples, prepareToRead, relativeToAbsolutePath, setLocation, setNumSamples, setUDFContextSignature, skipNext
 
Methods inherited from class org.apache.pig.LoadFunc
getAbsolutePath, getPathStrings, join
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUMROWS_TUPLE_MARKER

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

PoissonSampleLoader

public PoissonSampleLoader(String funcSpec,
                           String ns)
Method Detail

getNext

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
Returns:
the next tuple to be processed or null if there are no more tuples to be processed.
Throws:
IOException - if there is an exception while retrieving the next tuple

computeSamples

public void computeSamples(ArrayList<Pair<FileSpec,Boolean>> inputs,
                           PigContext pc)
                    throws ExecException
Computes the number of samples for the loader

Overrides:
computeSamples in class SampleLoader
Parameters:
inputs - : Set to pig inputs
pc - : PigContext object
Throws:
ExecException


Copyright © ${year} The Apache Software Foundation