List of usage examples for org.apache.hadoop.mapreduce Partitioner subclass-usage
From source file org.apache.pig.backend.hadoop.executionengine.tez.RoundRobinPartitioner.java
public class RoundRobinPartitioner extends Partitioner<Writable, Writable> { private int num = 0; @Override public int getPartition(Writable key, Writable value, int numPartitions) { num = ++num % numPartitions;
From source file org.apache.pig.backend.hadoop.executionengine.tez.runtime.RoundRobinPartitioner.java
public class RoundRobinPartitioner extends Partitioner<Writable, Writable> { private int num = 0; @Override public int getPartition(Writable key, Writable value, int numPartitions) { num = ++num % numPartitions;
From source file org.apache.pig.builtin.RoundRobinPartitioner.java
public class RoundRobinPartitioner extends Partitioner<Writable, Writable> implements Configurable { /** * Batch size for round robin partitioning. Batch size number of records * will be distributed to each partition in a round robin fashion. Default * value is 0 which distributes each record in a circular fashion. Higher
From source file org.apache.pig.test.utils.SimpleCustomPartitioner.java
public class SimpleCustomPartitioner extends Partitioner<PigNullableWritable, Writable> { @Override public int getPartition(PigNullableWritable key, Writable value, int numPartitions) { if (key.getValueAsPigType() instanceof Integer) { int ret = (((Integer) key.getValueAsPigType()).intValue() % numPartitions);
From source file org.apache.pig.test.utils.SimpleCustomPartitioner2.java
public class SimpleCustomPartitioner2 extends Partitioner<PigNullableWritable, Writable> { static Map<Integer, Integer> alternateMap = new HashMap<Integer, Integer>(); @Override public int getPartition(PigNullableWritable key, Writable value, int numPartitions) {
From source file org.apache.pig.test.utils.SimpleCustomPartitioner3.java
public class SimpleCustomPartitioner3 extends Partitioner<PigNullableWritable, Writable> { @Override public int getPartition(PigNullableWritable key, Writable value, int numPartitions) { return numPartitions >= 1 ? 1 : 0; } }
From source file org.apache.pig.test.utils.WrongCustomPartitioner.java
public class WrongCustomPartitioner extends Partitioner<PigNullableWritable, Writable> { @Override public int getPartition(PigNullableWritable key, Writable value, int numPartitions) { throw new RuntimeException("Wrong"); }
From source file org.apache.solr.hadoop.ForkedSolrCloudPartitioner.java
/**
* MapReduce partitioner that partitions the Mapper output such that each
* SolrInputDocument gets sent to the SolrCloud shard that it would have been
* sent to if the document were ingested via the standard SolrCloud Near Real
* Time (NRT) API.
*
From source file org.apache.solr.hadoop.SolrCloudPartitioner.java
/**
* MapReduce partitioner that partitions the Mapper output such that each
* SolrInputDocument gets sent to the SolrCloud shard that it would have been
* sent to if the document were ingested via the standard SolrCloud Near Real
* Time (NRT) API.
*
From source file org.archive.wayback.hadoop.AlphaPartitioner.java
/**
*
*
* @author brad
* @version $Date$, $Revision$
*/