public class InputSampler<K,V>
extends java.lang.Object
implements org.apache.hadoop.util.Tool
TotalOrderPartitioner.| Modifier and Type | Class and Description |
|---|---|
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 and Description |
|---|
InputSampler(JobConf conf) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.conf.Configuration |
getConf() |
static void |
main(java.lang.String[] args) |
int |
run(java.lang.String[] args)
Driver for InputSampler from the command line.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
static <K,V> void |
writePartitionFile(JobConf job,
InputSampler.Sampler<K,V> sampler)
Write a partition file for the given job, using the Sampler provided.
|
public InputSampler(JobConf conf)
public org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurablepublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic static <K,V> void writePartitionFile(JobConf job, InputSampler.Sampler<K,V> sampler) throws java.io.IOException
TotalOrderPartitioner.getPartitionFile(org.apache.hadoop.mapred.JobConf).java.io.IOExceptionpublic int run(java.lang.String[] args)
throws java.lang.Exception
writePartitionFile(org.apache.hadoop.mapred.JobConf, org.apache.hadoop.mapred.lib.InputSampler.Sampler<K, V>).run in interface org.apache.hadoop.util.Tooljava.lang.Exceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.ExceptionCopyright © 2009 The Apache Software Foundation