|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapred.lib.InputSampler<K,V>
public class InputSampler<K,V>
Utility for collecting samples and writing a partition file for
TotalOrderPartitioner.
| Nested Class Summary | |
|---|---|
static class |
InputSampler.IntervalSampler<K,V>
Sample from s splits at regular intervals. |
static class |
InputSampler.RandomSampler<K,V>
Sample from random points in the input. |
static interface |
InputSampler.Sampler<K,V>
Interface to sample using an InputFormat. |
static class |
InputSampler.SplitSampler<K,V>
Samples the first n records from s splits. |
| Constructor Summary | |
|---|---|
InputSampler(JobConf conf)
|
|
| Method Summary | ||
|---|---|---|
Configuration |
getConf()
Return the configuration used by this object. |
|
static void |
main(String[] args)
|
|
int |
run(String[] args)
Driver for InputSampler from the command line. |
|
void |
setConf(Configuration conf)
Set the configuration to be used by this object. |
|
static
|
writePartitionFile(JobConf job,
InputSampler.Sampler<K,V> sampler)
Write a partition file for the given job, using the Sampler provided. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InputSampler(JobConf conf)
| Method Detail |
|---|
public Configuration getConf()
Configurable
getConf in interface Configurablepublic void setConf(Configuration conf)
Configurable
setConf in interface Configurable
public static <K,V> void writePartitionFile(JobConf job,
InputSampler.Sampler<K,V> sampler)
throws IOException
TotalOrderPartitioner.getPartitionFile(org.apache.hadoop.mapred.JobConf).
IOException
public int run(String[] args)
throws Exception
writePartitionFile(org.apache.hadoop.mapred.JobConf, org.apache.hadoop.mapred.lib.InputSampler.Sampler) .
run in interface Toolargs - command specific arguments.
Exception
public static void main(String[] args)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||