A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://hadoop.apache.org/docs/r1.2.1/api/org/apache/hadoop/mapred/lib/HashPartitioner.html below:

HashPartitioner (Hadoop 1.2.1 API)

org.apache.hadoop.mapred.lib
Class HashPartitioner<K2,V2>
java.lang.Object
  org.apache.hadoop.mapred.lib.HashPartitioner<K2,V2>
All Implemented Interfaces:
JobConfigurable, Partitioner<K2,V2>
public class HashPartitioner<K2,V2>
extends Object
implements Partitioner<K2,V2>

Partition keys by their Object.hashCode().

    Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait   HashPartitioner
public HashPartitioner()
configure
public void configure(JobConf job)
Description copied from interface: JobConfigurable
Initializes a new instance from a JobConf.
Specified by:
configure in interface JobConfigurable
Parameters:
job - the configuration
getPartition
public int getPartition(K2 key,
                        V2 value,
                        int numReduceTasks)
Use Object.hashCode() to partition.
Specified by:
getPartition in interface Partitioner<K2,V2>
Parameters:
key - the key to be paritioned.
value - the entry value.
numReduceTasks - the total number of partitions.
Returns:
the partition number for the key.
Copyright © 2009 The Apache Software Foundation

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4