|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.regionserver.wal.HLogKey
@InterfaceAudience.Private public class HLogKey
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.
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
LOG
|
Constructor Summary | |
---|---|
HLogKey()
|
|
HLogKey(byte[] encodedRegionName,
TableName tablename,
long logSeqNum,
long now,
UUID clusterId)
Create the log key for writing to somewhere. |
|
HLogKey(WALProtos.WALKey walKey)
Create HLogKey wrapper around protobuf WAL key; takes care of compression. |
Method Summary | |
---|---|
int |
compareTo(HLogKey o)
|
boolean |
equals(Object obj)
|
WALProtos.WALKey.Builder |
getBuilder(WALCellCodec.ByteStringCompressor compressor)
|
UUID |
getClusterId()
Get the id of the original cluster |
byte[] |
getEncodedRegionName()
|
long |
getLogSeqNum()
|
NavigableMap<byte[],Integer> |
getScopes()
|
TableName |
getTablename()
|
long |
getWriteTime()
|
int |
hashCode()
|
void |
readFields(DataInput in)
|
void |
readFieldsFromPb(WALProtos.WALKey walKey,
WALCellCodec.ByteStringUncompressor uncompressor)
|
void |
setClusterId(UUID clusterId)
Set the cluster id of this key. |
void |
setCompressionContext(org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext)
|
void |
setScopes(NavigableMap<byte[],Integer> scopes)
|
String |
toString()
|
Map<String,Object> |
toStringMap()
Produces a string map for this key. |
void |
write(DataOutput out)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
public HLogKey()
public HLogKey(byte[] encodedRegionName, TableName 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 HLogKey(WALProtos.WALKey walKey) throws IOException
IOException
- Never, as the compression is not enabled.Method Detail |
---|
public void setCompressionContext(org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext)
compressionContext
- Compression context to usepublic byte[] getEncodedRegionName()
public TableName getTablename()
public long getLogSeqNum()
public long getWriteTime()
public UUID getClusterId()
public NavigableMap<byte[],Integer> getScopes()
public void setScopes(NavigableMap<byte[],Integer> scopes)
public void setClusterId(UUID clusterId)
clusterId
- public String toString()
toString
in class Object
public Map<String,Object> toStringMap()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(HLogKey o)
compareTo
in interface Comparable<HLogKey>
@Deprecated 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
public WALProtos.WALKey.Builder getBuilder(WALCellCodec.ByteStringCompressor compressor) throws IOException
IOException
public void readFieldsFromPb(WALProtos.WALKey walKey, WALCellCodec.ByteStringUncompressor uncompressor) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |