org.apache.pig.impl.builtin
Class PoissonSampleLoader
java.lang.Object
org.apache.pig.impl.builtin.SampleLoader
org.apache.pig.impl.builtin.PoissonSampleLoader
- All Implemented Interfaces:
- LoadFunc
public class PoissonSampleLoader
- extends SampleLoader
Currently skipInterval is similar to the randomsampleloader. However, if we were to use an
uniform distribution, we could precompute the intervals and read it from a file.
Methods inherited from class org.apache.pig.impl.builtin.SampleLoader |
bindTo, bytesToBag, bytesToCharArray, bytesToDouble, bytesToFloat, bytesToInteger, bytesToLong, bytesToMap, bytesToTuple, determineSchema, fieldsToRead, getNext, getNumSamples |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PoissonSampleLoader
public PoissonSampleLoader(String funcSpec,
String ns)
setNumSamples
public void setNumSamples(int n)
- Overrides:
setNumSamples
in class SampleLoader
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 inputspc
- : PigContext object
- Throws:
ExecException
Copyright © ${year} The Apache Software Foundation