org.apache.hadoop.hbase.regionserver
Class HLogKey
java.lang.Object
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. |
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 regiontablename
- - name of tablerow
- - row keylogSeqNum
- - log sequence number
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