org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.partitioners
Class WeightedRangePartitioner

java.lang.Object
  extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.partitioners.WeightedRangePartitioner
All Implemented Interfaces:
org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Partitioner<PigNullableWritable,org.apache.hadoop.io.Writable>

public class WeightedRangePartitioner
extends Object
implements org.apache.hadoop.mapred.Partitioner<PigNullableWritable,org.apache.hadoop.io.Writable>


Field Summary
static Map<PigNullableWritable,DiscreteProbabilitySampleGenerator> weightedParts
           
 
Constructor Summary
WeightedRangePartitioner()
           
 
Method Summary
 void configure(org.apache.hadoop.mapred.JobConf job)
           
 int getPartition(PigNullableWritable key, org.apache.hadoop.io.Writable value, int numPartitions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

weightedParts

public static Map<PigNullableWritable,DiscreteProbabilitySampleGenerator> weightedParts
Constructor Detail

WeightedRangePartitioner

public WeightedRangePartitioner()
Method Detail

getPartition

public int getPartition(PigNullableWritable key,
                        org.apache.hadoop.io.Writable value,
                        int numPartitions)
Specified by:
getPartition in interface org.apache.hadoop.mapred.Partitioner<PigNullableWritable,org.apache.hadoop.io.Writable>

configure

public void configure(org.apache.hadoop.mapred.JobConf job)
Specified by:
configure in interface org.apache.hadoop.mapred.JobConfigurable


Copyright © ${year} The Apache Software Foundation