org.apache.pig.impl.builtin
Class PoissonSampleLoader

java.lang.Object
  extended by org.apache.pig.impl.builtin.SampleLoader
      extended by 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.


Field Summary
 
Fields inherited from class org.apache.pig.impl.builtin.SampleLoader
loader, numSamples, skipInterval
 
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
 void setNumSamples(int n)
           
 
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
 

Constructor Detail

PoissonSampleLoader

public PoissonSampleLoader(String funcSpec,
                           String ns)
Method Detail

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 inputs
pc - : PigContext object
Throws:
ExecException


Copyright © ${year} The Apache Software Foundation