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