public class InputSampler<K,V> extends Object implements Tool
TotalOrderPartitioner
.限定符和类型 | 类和说明 |
---|---|
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.
|
构造器和说明 |
---|
InputSampler(JobConf conf) |
限定符和类型 | 方法和说明 |
---|---|
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 <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 Configuration getConf()
Configurable
getConf
在接口中 Configurable
public void setConf(Configuration conf)
Configurable
setConf
在接口中 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<K, V>)
.Copyright © 2009 The Apache Software Foundation