All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.panhongan.util.hadoop.FirstKeyIntPartitioner Maven / Gradle / Ivy

There is a newer version: 0.1.8
Show newest version
package com.github.panhongan.util.hadoop;

import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.io.Text;

public class FirstKeyIntPartitioner  extends org.apache.hadoop.mapreduce.Partitioner 
	implements org.apache.hadoop.mapred.Partitioner {
	
	@Override
	public int getPartition(Text key, Text value, int numReduceTasks) {
		return Integer.valueOf(key.toString()).intValue();
	}

	@Override
	public void configure(JobConf arg0) {
		// do nothing
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy