org.apache.hadoop.hbase.regionserver
Class HLogKey

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

public class HLogKey
extends Object
implements org.apache.hadoop.io.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. Some Transactional edits (START, COMMIT, ABORT) will not have an associated row.


Constructor Summary
HLogKey()
          Create an empty key useful when deserializing
HLogKey(byte[] regionName, byte[] tablename, byte[] 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)
           
 long getLogSeqNum()
           
 byte[] getRegionName()
           
 byte[] getRow()
           
 byte[] getTablename()
           
 int hashCode()
           
 void readFields(DataInput in)
           
 String toString()
           
 void write(DataOutput 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(byte[] regionName,
               byte[] tablename,
               byte[] 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

getRegionName

public byte[] getRegionName()
Returns:
region name

getTablename

public byte[] getTablename()
Returns:
table name

getRow

public byte[] getRow()
Returns:
row key

getLogSeqNum

public long getLogSeqNum()
Returns:
log sequence number

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
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2008 The Apache Software Foundation