@InterfaceAudience.Private public class HLogKey extends Object implements org.apache.hadoop.io.WritableComparable<HLogKey>
Some Transactional edits (START, COMMIT, ABORT) will not have an associated row.
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
HLogKey() |
HLogKey(byte[] encodedRegionName,
TableName tablename,
long logSeqNum,
long now,
List<UUID> clusterIds,
long nonceGroup,
long nonce)
Create the log key for writing to somewhere.
|
HLogKey(byte[] encodedRegionName,
TableName tablename,
long logSeqNum,
long now,
UUID clusterId) |
Modifier and Type | Method and Description |
---|---|
void |
addClusterId(UUID clusterId)
Marks that the cluster with the given clusterId has consumed the change
|
int |
compareTo(HLogKey o) |
boolean |
equals(Object obj) |
WALProtos.WALKey.Builder |
getBuilder(WALCellCodec.ByteStringCompressor compressor) |
List<UUID> |
getClusterIds() |
byte[] |
getEncodedRegionName() |
long |
getLogSeqNum() |
long |
getNonce() |
long |
getNonceGroup() |
UUID |
getOriginatingClusterId() |
NavigableMap<byte[],Integer> |
getScopes() |
TableName |
getTablename() |
long |
getWriteTime() |
int |
hashCode() |
protected void |
init(byte[] encodedRegionName,
TableName tablename,
long logSeqNum,
long now,
List<UUID> clusterIds,
long nonceGroup,
long nonce) |
void |
readFields(DataInput in) |
void |
readFieldsFromPb(WALProtos.WALKey walKey,
WALCellCodec.ByteStringUncompressor uncompressor) |
void |
readOlderScopes(NavigableMap<byte[],Integer> scopes) |
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.
|
public HLogKey()
public HLogKey(byte[] encodedRegionName, TableName tablename, long logSeqNum, long now, UUID clusterId)
public HLogKey(byte[] encodedRegionName, TableName tablename, long logSeqNum, long now, List<UUID> clusterIds, long nonceGroup, long nonce)
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.clusterIds
- the clusters that have consumed the change(used in Replication)protected void init(byte[] encodedRegionName, TableName tablename, long logSeqNum, long now, List<UUID> clusterIds, long nonceGroup, long nonce)
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 NavigableMap<byte[],Integer> getScopes()
public long getNonceGroup()
public long getNonce()
public void setScopes(NavigableMap<byte[],Integer> scopes)
public void readOlderScopes(NavigableMap<byte[],Integer> scopes)
public void addClusterId(UUID clusterId)
public List<UUID> getClusterIds()
public UUID getOriginatingClusterId()
public Map<String,Object> toStringMap()
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
Copyright © 2014 The Apache Software Foundation. All rights reserved.