Package org.apache.hadoop.hbase.io.hfile
Class BlockCacheKey
java.lang.Object
org.apache.hadoop.hbase.io.hfile.BlockCacheKey
- All Implemented Interfaces:
Serializable,HeapSize
Cache Key for use with implementations of
BlockCache- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlockCacheKey(String hfileName, long offset) Construct a new BlockCacheKeyBlockCacheKey(String hfileName, long offset, boolean isPrimaryReplica, BlockType blockType) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns The hfileName portion of this cache keylonginthashCode()longheapSize()Strings have two bytes per character due to default Java Unicode encoding (hence length times 2).booleanvoidsetBlockType(BlockType blockType) toString()
-
Field Details
-
serialVersionUID
- See Also:
-
hfileName
-
offset
-
blockType
-
isPrimaryReplicaBlock
-
FIXED_OVERHEAD
-
-
Constructor Details
-
BlockCacheKey
Construct a new BlockCacheKey- Parameters:
hfileName- The name of the HFile this block belongs to.offset- Offset of the block into the file
-
BlockCacheKey
-
-
Method Details
-
hashCode
-
equals
-
toString
-
heapSize
Strings have two bytes per character due to default Java Unicode encoding (hence length times 2). -
getHfileName
Returns The hfileName portion of this cache key -
isPrimary
-
getOffset
-
getBlockType
-
setBlockType
-