org.apache.hadoop.hbase.regionserver
Class HLogKey
java.lang.Object
org.apache.hadoop.hbase.regionserver.HLogKey
- All Implemented Interfaces:
- Comparable<HLogKey>, HeapSize, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<HLogKey>
- Direct Known Subclasses:
- THLogKey
public class HLogKey
- extends Object
- implements org.apache.hadoop.io.WritableComparable<HLogKey>, HeapSize
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()
Writable Consructor -- Do not use. |
HLogKey(byte[] regionName,
byte[] tablename,
long logSeqNum,
long now)
Create the log key!
We maintain the tablename mainly for debugging purposes. |
HLogKey
public HLogKey()
- Writable Consructor -- Do not use.
HLogKey
public HLogKey(byte[] regionName,
byte[] tablename,
long logSeqNum,
long now)
- 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 tablelogSeqNum
- - log sequence numbernow
- Time at which this edit was written.
getRegionName
public byte[] getRegionName()
- Returns:
- region name
getTablename
public byte[] getTablename()
- Returns:
- table name
getLogSeqNum
public long getLogSeqNum()
- Returns:
- log sequence number
getWriteTime
public long getWriteTime()
- Returns:
- the write time
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(HLogKey o)
- Specified by:
compareTo
in interface Comparable<HLogKey>
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
heapSize
public long heapSize()
- Specified by:
heapSize
in interface HeapSize
- Returns:
- Approximate 'exclusive deep size' of implementing object. Includes
count of payload and hosting object sizings.
Copyright © 2010 The Apache Software Foundation