@InterfaceAudience.Private public class BlockCacheKey extends Object implements 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,
BlockType blockType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
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 static final long FIXED_OVERHEAD
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, BlockType blockType)
public long heapSize()
public String getHfileName()
public boolean isPrimary()
public long getOffset()
public BlockType getBlockType()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.