org.apache.hadoop.hive.ql.io
Class DefaultHivePartitioner<K2,V2>

java.lang.Object
  extended by org.apache.hadoop.mapred.lib.HashPartitioner<K2,V2>
      extended by org.apache.hadoop.hive.ql.io.DefaultHivePartitioner<K2,V2>
All Implemented Interfaces:
HivePartitioner<K2,V2>, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Partitioner<K2,V2>

public class DefaultHivePartitioner<K2,V2>
extends org.apache.hadoop.mapred.lib.HashPartitioner<K2,V2>
implements HivePartitioner<K2,V2>

Partition keys by their Object.hashCode().


Constructor Summary
DefaultHivePartitioner()
           
 
Method Summary
 int getBucket(K2 key, V2 value, int numBuckets)
          Use Object.hashCode() to partition.
 
Methods inherited from class org.apache.hadoop.mapred.lib.HashPartitioner
configure, getPartition
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.mapred.Partitioner
getPartition
 
Methods inherited from interface org.apache.hadoop.mapred.JobConfigurable
configure
 

Constructor Detail

DefaultHivePartitioner

public DefaultHivePartitioner()
Method Detail

getBucket

public int getBucket(K2 key,
                     V2 value,
                     int numBuckets)
Use Object.hashCode() to partition.

Specified by:
getBucket in interface HivePartitioner<K2,V2>


Copyright © 2014 The Apache Software Foundation. All rights reserved.