public static class InputSampler.SplitSampler<K,V> extends Object implements InputSampler.Sampler<K,V>
Modifier and Type | Field and Description |
---|---|
protected int |
maxSplitsSampled |
protected int |
numSamples |
Constructor and Description |
---|
SplitSampler(int numSamples)
Create a SplitSampler sampling all splits.
|
SplitSampler(int numSamples,
int maxSplitsSampled)
Create a new SplitSampler.
|
Modifier and Type | Method and Description |
---|---|
K[] |
getSample(InputFormat<K,V> inf,
Job job)
From each split sampled, take the first numSamples / numSplits records.
|
protected final int numSamples
protected final int maxSplitsSampled
public SplitSampler(int numSamples)
numSamples
- Total number of samples to obtain from all selected
splits.public SplitSampler(int numSamples, int maxSplitsSampled)
numSamples
- Total number of samples to obtain from all selected
splits.maxSplitsSampled
- The maximum number of splits to examine.public K[] getSample(InputFormat<K,V> inf, Job job) throws IOException, InterruptedException
getSample
in interface InputSampler.Sampler<K,V>
IOException
InterruptedException
Copyright © 2016 Apache Software Foundation. All Rights Reserved.