org.apache.hadoop.hbase
Class HLogKey

java.lang.Object
  extended by org.apache.hadoop.hbase.HLogKey
All Implemented Interfaces:
Comparable, Writable, WritableComparable

public class HLogKey
extends Object
implements WritableComparable

A Key for an entry in the change log. The log intermingles edits to many tables and rows, so each log entry identifies the appropriate table and row. Within a table and row, they're also sorted.


Constructor Summary
HLogKey()
          Create an empty key useful when deserializing
HLogKey(Text regionName, Text tablename, Text row, long logSeqNum)
          Create the log key! We maintain the tablename mainly for debugging purposes.
 
Method Summary
 int compareTo(Object o)
          
 boolean equals(Object obj)
          
 int hashCode()
          
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
 String toString()
          
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HLogKey

public HLogKey()
Create an empty key useful when deserializing


HLogKey

public HLogKey(Text regionName,
               Text tablename,
               Text row,
               long logSeqNum)
Create the log key! We maintain the tablename mainly for debugging purposes. A regionName is always a sub-table object.

Parameters:
regionName - - name of region
tablename - - name of table
row - - row key
logSeqNum - - log sequence number
Method Detail

toString

public String toString()

Overrides:
toString in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

compareTo

public int compareTo(Object o)

Specified by:
compareTo in interface Comparable

write

public void write(DataOutput out)
           throws IOException
Serialize the fields of this object to out.

Specified by:
write in interface Writable
Parameters:
out - DataOuput to serialize this object into.
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Deserialize the fields of this object from in.

For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Parameters:
in - DataInput to deseriablize this object from.
Throws:
IOException


Copyright © 2006 The Apache Software Foundation