Example usage for org.apache.hadoop.mapreduce Partitioner subclass-usage

List of usage examples for org.apache.hadoop.mapreduce Partitioner subclass-usage

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce Partitioner subclass-usage.

Usage

From source file org.bgi.flexlab.gaea.data.mapreduce.partitioner.WindowsBasedPartitioner.java

public class WindowsBasedPartitioner<T> extends Partitioner<WindowsBasedWritable, T> {

    @Override
    public int getPartition(WindowsBasedWritable key, T v, int numPartitioner) {
        int hashcode = key.partition();
        return Math.abs(hashcode) % numPartitioner;

From source file org.broadinstitute.sting.gatk.hadoop.hadoopsrc.TotalOrderPartitioner.java

/**
 * Partitioner effecting a total order by reading split points from an
 * externally generated source.
 */
@InterfaceAudience.Public
@InterfaceStability.Stable

From source file org.calrissian.accumulorecipes.commons.hadoop.GroupedKeyRangePartitioner.java

/**
 * Hadoop partitioner that uses ranges, and optionally sub-bins based on hashing. This range partitioner will use multiple
 * groups to determine the partition, therefore allowing several reducers to represent several different writes to files
 * for different tables. It could be used, for instance, for a multi-table bulk ingest.
 */
public class GroupedKeyRangePartitioner extends Partitioner<GroupedKey, Writable> implements Configurable {

From source file org.dkpro.bigdata.collocations.GramKeyPartitioner.java

/**
 * Partition GramKeys based on their Gram, ignoring the secondary sort key so that all GramKeys with the same
 * gram are sent to the same partition.
 */
public final class GramKeyPartitioner extends Partitioner<GramKey, Gram> {

From source file org.godhuli.rhipe.RHPartitionerInteger.java

public class RHPartitionerInteger extends Partitioner<RHBytesWritable, RHBytesWritable> {

    public int getPartition(RHBytesWritable key, RHBytesWritable value, int numReduceTasks) {
        int hashcode = 0;
        // this is a crude and almost uses paritioning scheme.
        try {

From source file org.godhuli.rhipe.RHPartitionerNumeric.java

public class RHPartitionerNumeric extends Partitioner<RHBytesWritable, RHBytesWritable> {

    public int getPartition(RHBytesWritable key, RHBytesWritable value, int numReduceTasks) {
        int hashcode = 0;
        double hash2 = 0;
        // this is a crude and almost uses paritioning scheme.

From source file org.godhuli.rhipe.RHPartitionerText.java

public class RHPartitionerText extends Partitioner<RHBytesWritable, RHBytesWritable> {

    public int getPartition(RHBytesWritable key, RHBytesWritable value, int numReduceTasks) {
        int hashcode = 0;
        try {
            REXP r = key.getParsed();

From source file org.htuple.TupleMapReducePartitioner.java

/**
 * A partitioner for {@link org.htuple.Tuple}'s to support secondary sorting.
 * <p/>
 * See {@link ShuffleUtils} for examples of how secondary sort can be configured.
 */
public class TupleMapReducePartitioner extends Partitioner<Tuple, Object> implements Configurable {

From source file org.huahinframework.core.lib.partition.SimplePartitioner.java

/**
 * <code>SimplePartitioner</code> partitioner key is that you specify in the <code>Record#addGrouping</code>.
 */
public class SimplePartitioner extends Partitioner<Key, Writable> {
    /**
     * {@inheritDoc}

From source file org.mrgeo.data.accumulo.partitioners.AccumuloMrGeoRangePartitioner.java

/**
 * This class is an adaptation of the AccumuloRangePartitioner.
 * The change here is associated with the keys and values that are used
 * for determining the correct partition.
 */
public class AccumuloMrGeoRangePartitioner extends Partitioner<TileIdWritable, Writable> implements Configurable {