Example usage for org.apache.hadoop.mapred.lib HashPartitioner subclass-usage

List of usage examples for org.apache.hadoop.mapred.lib HashPartitioner subclass-usage

Introduction

In this page you can find the example usage for org.apache.hadoop.mapred.lib HashPartitioner subclass-usage.

Usage

From source file fm.last.feathers.partition.Prefix.java

public class Prefix extends HashPartitioner<TypedBytesWritable, TypedBytesWritable> {

    private final TypedBytesWritable partKey = new TypedBytesWritable();

    public int getPartition(TypedBytesWritable key, TypedBytesWritable value, int numPartitions) {
        partKey.setValue(((ArrayList) key.getValue()).get(0));