@InterfaceAudience.Private public class BlockCacheKey extends Object implements org.apache.hadoop.hbase.io.HeapSize, Serializable
BlockCache| Modifier and Type | Field and Description |
|---|---|
static long |
FIXED_OVERHEAD |
| Constructor and Description |
|---|
BlockCacheKey(String hfileName,
long offset)
Construct a new BlockCacheKey
|
BlockCacheKey(String hfileName,
long offset,
boolean isPrimaryReplica,
org.apache.hadoop.hbase.io.hfile.BlockType blockType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
org.apache.hadoop.hbase.io.hfile.BlockType |
getBlockType() |
String |
getHfileName() |
long |
getOffset() |
int |
hashCode() |
long |
heapSize()
Strings have two bytes per character due to default Java Unicode encoding
(hence length times 2).
|
boolean |
isPrimary() |
String |
toString() |
public BlockCacheKey(String hfileName, long offset)
hfileName - The name of the HFile this block belongs to.offset - Offset of the block into the filepublic BlockCacheKey(String hfileName, long offset, boolean isPrimaryReplica, org.apache.hadoop.hbase.io.hfile.BlockType blockType)
public long heapSize()
heapSize in interface org.apache.hadoop.hbase.io.HeapSizepublic String getHfileName()
public boolean isPrimary()
public long getOffset()
public org.apache.hadoop.hbase.io.hfile.BlockType getBlockType()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.