org.apache.hadoop.hive.ql.io
Class HiveKey

java.lang.Object
  extended by org.apache.hadoop.io.BinaryComparable
      extended by org.apache.hadoop.io.BytesWritable
          extended by org.apache.hadoop.hive.ql.io.HiveKey
All Implemented Interfaces:
Comparable<org.apache.hadoop.io.BinaryComparable>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<org.apache.hadoop.io.BinaryComparable>

public class HiveKey
extends org.apache.hadoop.io.BytesWritable

HiveKey is a simple wrapper on Text which allows us to set the hashCode easily. hashCode is used for hadoop partitioner.


Nested Class Summary
static class HiveKey.Comparator
          A Comparator optimized for HiveKey.
 
Field Summary
protected  int myHashCode
           
 
Constructor Summary
HiveKey()
           
 
Method Summary
 int hashCode()
           
 void setHashCode(int myHashCode)
           
 
Methods inherited from class org.apache.hadoop.io.BytesWritable
equals, get, getBytes, getCapacity, getLength, getSize, readFields, set, set, setCapacity, setSize, toString, write
 
Methods inherited from class org.apache.hadoop.io.BinaryComparable
compareTo, compareTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

myHashCode

protected int myHashCode
Constructor Detail

HiveKey

public HiveKey()
Method Detail

setHashCode

public void setHashCode(int myHashCode)

hashCode

public int hashCode()
Overrides:
hashCode in class org.apache.hadoop.io.BytesWritable


Copyright © 2013 The Apache Software Foundation