public class HLogKey extends Object implements org.apache.hadoop.io.WritableComparable<HLogKey>
Some Transactional edits (START, COMMIT, ABORT) will not have an associated row.
Constructor and Description |
---|
HLogKey()
Writable Constructor -- Do not use.
|
HLogKey(byte[] encodedRegionName,
byte[] tablename,
long logSeqNum,
long now,
UUID clusterId)
Create the log key!
We maintain the tablename mainly for debugging purposes.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(HLogKey o) |
boolean |
equals(Object obj) |
UUID |
getClusterId()
Get the id of the original cluster
|
byte[] |
getEncodedRegionName() |
long |
getLogSeqNum() |
byte[] |
getTablename() |
long |
getWriteTime() |
int |
hashCode() |
void |
readFields(DataInput in) |
void |
setClusterId(UUID clusterId)
Set the cluster id of this key
|
void |
setCompressionContext(org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext) |
String |
toString() |
Map<String,Object> |
toStringMap()
Produces a string map for this key.
|
void |
write(DataOutput out) |
public HLogKey()
public HLogKey(byte[] encodedRegionName, byte[] tablename, long logSeqNum, long now, UUID clusterId)
encodedRegionName
- Encoded name of the region as returned by
HRegionInfo#getEncodedNameAsBytes()
.tablename
- - name of tablelogSeqNum
- - log sequence numbernow
- Time at which this edit was written.clusterId
- of the cluster (used in Replication)public void setCompressionContext(org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext)
compressionContext
- Compression context to usepublic byte[] getEncodedRegionName()
public byte[] getTablename()
public long getLogSeqNum()
public long getWriteTime()
public UUID getClusterId()
public void setClusterId(UUID clusterId)
clusterId
- public Map<String,Object> toStringMap()
public int compareTo(HLogKey o)
compareTo
in interface Comparable<HLogKey>
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.