| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapreduce.lib.partition.InputSampler.SplitSampler<K,V>
public static class InputSampler.SplitSampler<K,V>
Samples the first n records from s splits. Inexpensive way to sample random data.
| Constructor Summary | |
|---|---|
| InputSampler.SplitSampler(int numSamples)Create a SplitSampler sampling all splits. | |
| InputSampler.SplitSampler(int numSamples,
                          int maxSplitsSampled)Create a new SplitSampler. | |
| Method Summary | |
|---|---|
|  K[] | getSample(InputFormat<K,V> inf,
          Job job)From each split sampled, take the first numSamples / numSplits records. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public InputSampler.SplitSampler(int numSamples)
numSamples - Total number of samples to obtain from all selected
                   splits.
public InputSampler.SplitSampler(int numSamples,
                                 int maxSplitsSampled)
numSamples - Total number of samples to obtain from all selected
                   splits.maxSplitsSampled - The maximum number of splits to examine.| Method Detail | 
|---|
public K[] getSample(InputFormat<K,V> inf,
                     Job job)
              throws IOException,
                     InterruptedException
getSample in interface InputSampler.Sampler<K,V>IOException
InterruptedException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||